Completed
Push — master ( d3ded3...063c30 )
by Paweł
02:40
created

ShowPage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBlockContents() 0 4 1
A getDefinedElements() 0 6 1
A getRouteName() 0 4 1
1
<?php
2
3
namespace Lakion\SyliusCmsBundle\Tests\Behat\Page\Admin\StringBlock;
4
5
use Sylius\Behat\Page\SymfonyPage;
6
7
class ShowPage extends SymfonyPage implements ShowPageInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function getBlockContents()
13
    {
14
        return $this->getElement('block')->getHtml();
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    protected function getDefinedElements()
21
    {
22
        return array_merge(parent::getDefinedElements(), [
23
            'block' => '#lakion_sylius_cms_block_preview',
24
        ]);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function getRouteName()
31
    {
32
        return 'lakion_sylius_cms_admin_string_block_show';
33
    }
34
}
35