Skip to content

Commit

Permalink
Remove calls to TestCase::iniSet() and calls to deprecated methods …
Browse files Browse the repository at this point in the history
…of `MockBuilder`
  • Loading branch information
alexandre-daubois committed May 6, 2024
1 parent 2e0ac88 commit 3cf05e7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Tests/Loader/ObjectLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ public function testExceptionOnBadMethod()
public function testExceptionOnMethodNotReturningCollection()
{
$this->expectException(\LogicException::class);
$service = $this->getMockBuilder(\stdClass::class)
->addMethods(['loadRoutes'])
->getMock();

$service = $this->createMock(CustomRouteLoader::class);
$service->expects($this->once())
->method('loadRoutes')
->willReturn('NOT_A_COLLECTION');
Expand All @@ -109,6 +108,11 @@ protected function getObject(string $id): object
}
}

interface CustomRouteLoader
{
public function loadRoutes();
}

class TestObjectLoaderRouteService
{
private $collection;
Expand Down

0 comments on commit 3cf05e7

Please sign in to comment.