diff --git a/tests/unit/Api/CollectionTest.php b/tests/unit/Api/CollectionTest.php index 2ca9010..5e05af7 100644 --- a/tests/unit/Api/CollectionTest.php +++ b/tests/unit/Api/CollectionTest.php @@ -4,9 +4,9 @@ use App\Constants\AclRoles; use Phalcon\Acl; -use PhalconRest\Api\Collection; -use PhalconRest\Api\Endpoint; -use PhalconRest\Constants\PostedDataMethods; +use PhalconRest\Api\ApiCollection; +use PhalconRest\Api\ApiEndpoint; +use PhalconApi\Constants\PostedDataMethods; class CollectionTest extends \Codeception\TestCase\Test { @@ -15,7 +15,7 @@ class CollectionTest extends \Codeception\TestCase\Test { protected function _before() { - $this->collection = Collection::factory('/books') + $this->collection = ApiCollection::factory('/books') ->name('Books') ->description('a short description'); } @@ -43,8 +43,7 @@ public function testDescription() { public function testGetEndpoints() { $endpoints = [ - Endpoint::get('/all', 'all'), - Endpoint::get('/find/:id', 'find') + ApiEndpoint::get('/all', 'all') ]; foreach($endpoints as $endpoint) { @@ -84,4 +83,4 @@ public function testDeniedRoles() { $this->assertEquals($this->collection->getDeniedRoles(), [AclRoles::MANAGER, AclRoles::USER]); } -} \ No newline at end of file +} diff --git a/tests/unit/Api/EndpointTest.php b/tests/unit/Api/EndpointTest.php index 29cfd3d..cc5d62f 100644 --- a/tests/unit/Api/EndpointTest.php +++ b/tests/unit/Api/EndpointTest.php @@ -2,9 +2,9 @@ namespace PhalconRest\Test\Unit\Api; -use PhalconRest\Api\Endpoint; -use PhalconRest\Constants\HttpMethods; -use PhalconRest\Constants\PostedDataMethods; +use PhalconRest\Api\ApiEndpoint; +use PhalconApi\Constants\HttpMethods; +use PhalconApi\Constants\PostedDataMethods; class EndpointTest extends \Codeception\TestCase\Test { @@ -15,7 +15,7 @@ class EndpointTest extends \Codeception\TestCase\Test { protected function _before() { - $this->endpoint = Endpoint::get('/all', 'all') + $this->endpoint = ApiEndpoint::get('/all', 'all') ->name('All') ->description('a short description') ->exampleResponse(self::EXAMPLE_RESPONSE); @@ -72,4 +72,4 @@ public function testExpectsPostData() { $this->endpoint->expectsPostData(); $this->assertEquals($this->endpoint->getPostedDataMethod(), PostedDataMethods::POST); } -} \ No newline at end of file +} diff --git a/tests/unit/Api/ResourceTest.php b/tests/unit/Api/ResourceTest.php index 3d1fd69..75c8ea5 100644 --- a/tests/unit/Api/ResourceTest.php +++ b/tests/unit/Api/ResourceTest.php @@ -4,7 +4,7 @@ use App\Model\Album; use App\Transformers\AlbumTransformer; -use PhalconRest\Api\Resource; +use PhalconRest\Api\ApiResource; class ResourceTest extends \Codeception\TestCase\Test { @@ -13,7 +13,7 @@ class ResourceTest extends \Codeception\TestCase\Test { protected function _before() { - $this->resource = Resource::factory('/albums') + $this->resource = ApiResource::factory('/albums') ->model(Album::class) ->transformer(AlbumTransformer::class) ->itemKey('album') @@ -39,4 +39,4 @@ public function testCollectionKey() { $this->assertEquals($this->resource->getCollectionKey(), 'albums'); } -} \ No newline at end of file +}