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\Product;
use Sylius\Behat\Behaviour\SpecifiesItsCode;
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
/**
* @author Łukasz Chruściel <[email protected]>
class CreateSimpleProductPage extends BaseCreatePage implements CreateSimpleProductPageInterface
{
use SpecifiesItsCode;
* {@inheritdoc}
public function nameItIn($name, $localeCode)
$this->getDocument()->fillField(
sprintf('sylius_product_translations_%s_name', $localeCode), $name
);
}
public function specifyPrice($price)
$this->getDocument()->fillField('Price', $price);
protected function getDefinedElements()
return array_merge(parent::getDefinedElements(), [
'code' => '#sylius_product_code',
'name' => '#sylius_product_translations_en_US_name',
'price' => '#sylius_product_masterVariant_price',
]);
public function getRouteName()
return parent::getRouteName() . '_simple';