for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Behat\Context\Setup;
use Behat\Behat\Context\Context;
use Behat\Mink\Mink;
use Behat\MinkExtension\Context\MinkAwareContext;
use Sylius\Bundle\CoreBundle\Test\Services\SecurityServiceInterface;
/**
* @author Arkadiusz Krakowiak <[email protected]>
final class SecurityContext implements Context, MinkAwareContext
{
* @var SecurityServiceInterface
private $securityService;
* @var Mink
private $mink;
* @param SecurityServiceInterface $securityService
public function __construct(SecurityServiceInterface $securityService)
$this->securityService = $securityService;
}
* @Given I am logged in as :email
public function iAmLoggedInAs($email)
$this->securityService->logIn($email, 'main', $this->mink->getSession());
* {@inheritdoc}
public function setMink(Mink $mink)
$this->mink = $mink;
public function setMinkParameters(array $parameters)