1 | <?php |
||
11 | final class AbstractTaggableTest extends TestCase |
||
12 | { |
||
13 | public function testAddTag(): void |
||
14 | { |
||
15 | $tag = $this->getMockBuilder('Beelab\TagBundle\Tag\TagInterface')->getMock(); |
||
16 | $entity = new Entity(); |
||
17 | $entity->addTag($tag); |
||
|
|||
18 | $this->assertTrue(in_array($tag, $entity->getTags())); |
||
19 | } |
||
20 | |||
21 | public function testRemoveTag(): void |
||
29 | |||
30 | public function testGetTags(): void |
||
37 | |||
38 | public function testGetTagsText(): void |
||
45 | |||
46 | public function testGetTagNames(): void |
||
52 | } |
||
53 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: