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\Page\Admin\Crud;
use Behat\Mink\Session;
use Sylius\Behat\Page\SymfonyPage;
use Symfony\Component\Routing\RouterInterface;
/**
* @author Arkadiusz Krakowiak <[email protected]>
class CreatePage extends SymfonyPage implements CreatePageInterface
{
* @var string
private $resourceName;
* @param Session $session
* @param array $parameters
* @param RouterInterface $router
* @param string $resourceName
public function __construct(Session $session, array $parameters, RouterInterface $router, $resourceName)
parent::__construct($session, $parameters, $router);
$this->resourceName = strtolower($resourceName);
}
* {@inheritdoc}
public function create()
$this->getDocument()->pressButton('Create');
protected function getRouteName()
return sprintf('sylius_admin_%s_create', $this->resourceName);
* @return string
protected function getResourceName()
return $this->resourceName;