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"); |
||
0 ignored issues
–
show
|
|||
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); |
||
43 | } |
||
44 | } |
||
45 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..