Completed
Push — master ( a13c2f...df1c7f )
by Kamil
9s
created

CreatePage::getDefinedElements()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Tests\Lakion\SyliusCmsBundle\Behat\Page\Admin\StaticContent;
4
5
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
6
7
final class CreatePage extends BaseCreatePage implements CreatePageInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function setTitle($title)
13
    {
14
        $this->getSession()->getPage()->fillField('Title', $title);
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function setName($name)
21
    {
22
        $this->getSession()->getPage()->fillField('Internal name', $name);
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function setBody($body)
29
    {
30
        $this->getSession()->getPage()->fillField('Body', $body);
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    protected function getDefinedElements()
37
    {
38
        return array_merge(parent::getDefinedElements(), [
39
            'body' => '#lakion_sylius_cms_static_content_body',
40
            'name' => '#lakion_sylius_cms_static_content_name',
41
            'title' => '#lakion_sylius_cms_static_content_title',
42
        ]);
43
    }
44
}
45