Completed
Push — 5.6 ( f4d50c...e1bb66 )
by Jeroen
10:05 queued 11s
created

testGettersAndSetters()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14

Duplication

Lines 14
Ratio 100 %

Importance

Changes 0
Metric Value
dl 14
loc 14
c 0
b 0
f 0
rs 9.7998
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Kunstmaan\ArticleBundle\Tests\PagePartAdmin;
4
5
use Kunstmaan\ArticleBundle\PagePartAdmin\AbstractArticlePagePagePartAdminConfigurator;
6
use PHPUnit\Framework\TestCase;
7
8 View Code Duplication
class AbstractArticlePagePagePartAdminConfiguratorTest extends TestCase
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...
9
{
10
    public function testGettersAndSetters()
11
    {
12
        $entity = new AbstractArticlePagePagePartAdminConfigurator();
13
14
        $this->assertEquals('Page parts', $entity->getName());
15
        $this->assertEquals('main', $entity->getContext());
16
        $this->assertEquals('', $entity->getWidgetTemplate());
17
        $types = $entity->getPossiblePagePartTypes();
18
        $this->assertInternalType('array', $types);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
19
        foreach ($types as $type) {
20
            $this->assertArrayHasKey('name', $type);
21
            $this->assertArrayHasKey('class', $type);
22
        }
23
    }
24
}
25