Completed
Push — master ( fcb59d...326ddf )
by Ruud
299:19 queued 288:03
created

unit/Entity/PageParts/AbstractFormPagePartTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\FormBundle\Tests\Entity\PageParts;
4
5
use Kunstmaan\FormBundle\Entity\PageParts\AbstractFormPagePart;
6
use PHPUnit\Framework\TestCase;
7
8
class AbstractFormPagePartTest extends TestCase
9
{
10
    /**
11
     * @var AbstractFormPagePart
12
     */
13
    protected $object;
14
15
    /**
16
     * Sets up the fixture, for example, opens a network connection.
17
     * This method is called before a test is executed.
18
     */
19
    protected function setUp()
20
    {
21
        $this->object = $this->getMockForAbstractClass("Kunstmaan\FormBundle\Entity\PageParts\AbstractFormPagePart");
22
    }
23
24
    public function testGetUniqueId()
25
    {
26
        $object = $this->object;
27
        $this->assertSame(str_replace('\\', '', get_class($object)), $object->getUniqueId());
28
    }
29
30
    public function testSetGetLabel()
31
    {
32
        $object = $this->object;
33
        $value = 'Some label';
34
        $object->setLabel($value);
35
        $this->assertEquals($value, $object->getLabel());
36
    }
37
38
    public function testGetAdminView()
39
    {
40
        $stringValue = $this->object->getAdminView();
41
        $this->assertNotNull($stringValue);
42
        $this->assertInternalType('string', $stringValue);
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...
43
    }
44
}
45