1 | <?php |
||
9 | class ServiceEntityRepositoryTest extends TestCase |
||
10 | { |
||
11 | /** |
||
12 | * @expectedException \LogicException |
||
13 | * @expectedExceptionMessage Could not find the entity manager for class "Doctrine\Bundle\DoctrineBundle\Tests\Repository\TestEntity". Check your Doctrine configuration to make sure it is configured to load this entity’s metadata. |
||
14 | */ |
||
15 | public function testConstructorThrowsExceptionWhenNoManagerFound() |
||
20 | } |
||
21 |
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: