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

ShowPage::getDefinedElements()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Tests\Lakion\SyliusCmsBundle\Behat\Page\Admin\CustomBlock;
4
5
use Sylius\Behat\Page\SymfonyPage;
6
7 View Code Duplication
class ShowPage extends SymfonyPage implements ShowPageInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function getBlockContents()
13
    {
14
        return $this->getElement('block')->getHtml();
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getBlockImageUrl()
21
    {
22
        return $this->getElement('block')->find('css', 'img')->getAttribute('src');
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function getDefinedElements()
29
    {
30
        return array_merge(parent::getDefinedElements(), [
31
            'block' => '#lakion_sylius_cms_block_preview',
32
        ]);
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function getRouteName()
39
    {
40
        return 'lakion_sylius_cms_admin_custom_block_show';
41
    }
42
}
43