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\ChecksCodeImmutability;
use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage;
/**
* @author Łukasz Chruściel <[email protected]>
class UpdateSimpleProductPage extends BaseUpdatePage implements UpdateSimpleProductPageInterface
{
use ChecksCodeImmutability;
* {@inheritdoc}
public function nameItIn($name, $localeCode)
$this->getDocument()->fillField(
sprintf('sylius_product_translations_%s_name', $localeCode), $name
);
}
protected function getCodeElement()
return $this->getElement('code');
public function specifyPrice($price)
$this->getDocument()->fillField('Price', $price);
protected function getDefinedElements()
return array_merge(parent::getDefinedElements(), [
'code' => '#sylius_product_code',
'price' => '#sylius_product_masterVariant_price',
'name' => '#sylius_product_translations_en_US_name',
]);