Use dereference() instead of getObject()
This commit is contained in:
parent
0e494a7306
commit
11152623d4
@ -30,7 +30,7 @@ class GetObjectController
|
||||
public function handle( Request $request )
|
||||
{
|
||||
$uri = $request->getUri();
|
||||
$object = $this->objectsService->getObject( $uri );
|
||||
$object = $this->objectsService->dereference( $uri );
|
||||
if ( ! $object ) {
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class GetObjectControllerTest extends TestCase
|
||||
public function setUp()
|
||||
{
|
||||
$objectsService = $this->createMock( ObjectsService::class );
|
||||
$objectsService->method( 'getObject' )->will(
|
||||
$objectsService->method( 'dereference' )->will(
|
||||
$this->returnCallback( function( $uri ) {
|
||||
if ( array_key_exists( $uri, self::OBJECTS ) ) {
|
||||
return $this->objectFromArray( self::OBJECTS[$uri] );
|
||||
|
Loading…
Reference in New Issue
Block a user