1 | <?php |
||
10 | class ServiceEntityRepositoryTest extends TestCase |
||
11 | { |
||
12 | public static function setUpBeforeClass() : void |
||
20 | |||
21 | /** |
||
22 | * @expectedException \LogicException |
||
23 | * @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. |
||
24 | */ |
||
25 | public function testConstructorThrowsExceptionWhenNoManagerFound() : void |
||
30 | } |
||
31 |
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: