From 11152623d4078a95bde18edcbdee6216cd7bb943 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 17 Jan 2019 14:48:12 -0500 Subject: [PATCH] Use dereference() instead of getObject() --- src/Controllers/GetObjectController.php | 2 +- test/Controllers/GetObjectControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/GetObjectController.php b/src/Controllers/GetObjectController.php index ed2b870..2605993 100644 --- a/src/Controllers/GetObjectController.php +++ b/src/Controllers/GetObjectController.php @@ -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(); } diff --git a/test/Controllers/GetObjectControllerTest.php b/test/Controllers/GetObjectControllerTest.php index b807ee7..6988f15 100644 --- a/test/Controllers/GetObjectControllerTest.php +++ b/test/Controllers/GetObjectControllerTest.php @@ -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] );