Use dereference() instead of getObject()

This commit is contained in:
Jeremy Dormitzer 2019-01-17 14:48:12 -05:00
parent 0e494a7306
commit 11152623d4
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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] );