diff --git a/tests/Assets/Mock/CountableEntityMock.php b/tests/Assets/Mock/CountableEntityMock.php new file mode 100644 index 00000000..c5bb1ad0 --- /dev/null +++ b/tests/Assets/Mock/CountableEntityMock.php @@ -0,0 +1,7 @@ +em = m::mock(EntityManagerInterface::class); $this->registry = m::mock(ManagerRegistry::class); $this->builder = m::mock(QueryBuilder::class); - $this->query = m::mock(Doctrine\ORM\Query::class); + $this->query = m::mock(Query::class); $this->verifier = new DoctrinePresenceVerifier( $this->registry @@ -200,7 +205,7 @@ public function test_counting_invalid_entity_throws_exception() ->andReturn(null); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('No Entity Manager could be found for [CountableEntityMock].'); + $this->expectExceptionMessage('No Entity Manager could be found for [LaravelDoctrineTest\ORM\Assets\Mock\CountableEntityMock].'); $this->verifier->getCount(CountableEntityMock::class, 'email', 'test@email.com'); } @@ -254,7 +259,7 @@ protected function defaultGetMultiCountMocks() $this->builder->shouldReceive('where') ->once(); - $this->builder->shouldReceive('expr')->andReturn(new \Doctrine\ORM\Query\Expr()); + $this->builder->shouldReceive('expr')->andReturn(new Expr()); $this->builder->shouldReceive('in')->with("e.email", ['test@email.com']); $this->builder->shouldReceive('getQuery') @@ -268,7 +273,3 @@ protected function tearDown(): void m::close(); } } - -class CountableEntityMock -{ -}