Completed
Push — master ( 22512f...2e0539 )
by Kamil
24:53
created

thatStoreIsOperatingOnASingleFranceChannel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Behat\Context\Setup;
13
14
use Behat\Behat\Context\Context;
15
use Sylius\Component\Core\Test\Services\DefaultStoreDataInterface;
16
use Sylius\Component\Core\Test\Services\SharedStorageInterface;
17
18
/**
19
 * @author Arkadiusz Krakowiak <[email protected]>
20
 */
21
class ChannelContext implements Context
22
{
23
    /**
24
     * @var DefaultStoreDataInterface
25
     */
26
    private $defaultFranceChannelFactory;
27
28
    /**
29
     * @var SharedStorageInterface
30
     */
31
    private $sharedStorage;
32
33
    /**
34
     * @param DefaultStoreDataInterface $defaultFranceChannelFactory
35
     * @param SharedStorageInterface $sharedStorage
36
     */
37
    public function __construct(
38
        DefaultStoreDataInterface $defaultFranceChannelFactory,
39
        SharedStorageInterface $sharedStorage
40
    ) {
41
        $this->defaultFranceChannelFactory = $defaultFranceChannelFactory;
42
        $this->sharedStorage = $sharedStorage;
43
    }
44
45
    /**
46
     * @Given the store is operating on a single "France" channel
47
     */
48
    public function thatStoreIsOperatingOnASingleFranceChannel()
49
    {
50
        $defaultData = $this->defaultFranceChannelFactory->create();
51
        $this->sharedStorage->setClipboard($defaultData);
52
    }
53
}
54