for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lakion\SyliusCmsBundle\Tests\Behat\Page\Admin\CustomBlock;
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
class CreatePage extends BaseCreatePage implements CreatePageInterface
{
/**
* {@inheritdoc}
*/
public function setBody($body)
$this->getSession()->getPage()->fillField('Body', $body);
}
public function setLink($link)
$this->getSession()->getPage()->fillField('Link', $link);
public function setName($name)
$this->getSession()->getPage()->fillField('Name', $name);
public function setTitle($title)
$this->getSession()->getPage()->fillField('Title', $title);
public function attachImage($relativePath)
$this->getSession()->getPage()->attachFileToField('Image', (string) $this->getParameter('files_path') . $relativePath);
protected function getDefinedElements()
return array_merge(parent::getDefinedElements(), [
'body' => '#lakion_sylius_cms_custom_block_body',
'link' => '#lakion_sylius_cms_custom_block_linkUrl',
'name' => '#lakion_sylius_cms_custom_block_name',
'title' => '#lakion_sylius_cms_custom_block_title',
]);