Completed
Push — master ( 90ccc1...22512f )
by Kamil
35:43
created

src/Sylius/Behat/Context/FeatureContext.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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;
13
14
use SensioLabs\Behat\PageObjectExtension\Context\PageObjectContext;
15
use Sylius\Component\Core\Test\Services\SharedStorageInterface;
16
use Behat\MinkExtension\Context\MinkAwareContext;
17
use Behat\Mink\Mink;
18
use Behat\Mink\Session;
19
use Behat\Mink\WebAssert;
20
21
/**
22
 * @author Arkadiusz Krakowiak <[email protected]>
23
 */
24
abstract class FeatureContext extends PageObjectContext implements MinkAwareContext
0 ignored issues
show
Deprecated Code introduced by
The class SensioLabs\Behat\PageObj...ntext\PageObjectContext has been deprecated with message: in 2.0, to be removed in 3.0. Use the argument resolver instead. See http://behat-page-object-extension.readthedocs.org/en/latest/guide/working_with_page_objects.html#instantiating-a-page-object

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
25
{
26
    /**
27
     * @var Mink
28
     */
29
    protected $mink;
30
31
    /**
32
     * @var array
33
     */
34
    protected $minkParameters;
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function setMink(Mink $mink)
40
    {
41
        $this->mink = $mink;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function setMinkParameters(array $parameters)
48
    {
49
        $this->minkParameters = $parameters;
50
    }
51
52
    /**
53
     * @param string|null $name name of the session OR active session will be used
54
     *
55
     * @return Session
56
     */
57
    public function getSession($name = null)
58
    {
59
        return $this->mink->getSession($name);
60
    }
61
62
    /**
63
     * @param string|null $name name of the session OR active session will be used
64
     *
65
     * @return WebAssert
66
     */
67
    public function assertSession($name = null)
68
    {
69
        return $this->mink->assertSession($name);
70
    }
71
}
72