1 | <?php |
||
7 | class IndexItemTest extends \PHPUnit_Framework_TestCase |
||
8 | { |
||
9 | /** |
||
10 | * @var SumoCoders\FrameworkSearchBundle\Entity\IndexItem |
||
11 | */ |
||
12 | private $indexItem; |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private $defaultData = array( |
||
18 | 'objectType' => 'User', |
||
19 | 'otherId' => 1, |
||
20 | 'field' => 'nickname', |
||
21 | 'value' => 'J. Doe', |
||
22 | ); |
||
23 | |||
24 | /** |
||
25 | * Test the getters and setters |
||
26 | */ |
||
27 | public function testGettersAndSetters() |
||
28 | { |
||
29 | $this->indexItem = new IndexItem( |
||
|
|||
30 | $this->defaultData['objectType'], |
||
31 | $this->defaultData['otherId'], |
||
32 | $this->defaultData['field'], |
||
33 | $this->defaultData['value'] |
||
34 | ); |
||
35 | |||
36 | $this->assertEquals($this->defaultData['objectType'], $this->indexItem->getObjectType()); |
||
37 | $this->assertEquals($this->defaultData['otherId'], $this->indexItem->getOtherId()); |
||
38 | $this->assertEquals($this->defaultData['field'], $this->indexItem->getField()); |
||
39 | $this->assertEquals($this->defaultData['value'], $this->indexItem->getValue()); |
||
40 | } |
||
41 | |||
42 | public function testCreateMultipleObjectsBasedOnProperties() |
||
70 | |||
71 | public function testCreateMultipleObjectsBasedOnPropertiesFromObject() |
||
92 | } |
||
93 | |||
118 |
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..