From faf59a6c6df92e86c83bf6e75cc20e4c1b52c484 Mon Sep 17 00:00:00 2001 From: Andrew Wojtys Date: Fri, 29 Jul 2016 12:43:43 +0300 Subject: [PATCH 1/6] added endpoint to get boards for organization --- docs/Api/Organization.md | 4 + docs/Api/Organization/Boards.md | 7 ++ lib/Trello/Api/Organization.php | 10 +++ lib/Trello/Api/Organization/Boards.php | 51 ++++++++++++ .../Unit/Api/Organization/BoardsTest.php | 80 +++++++++++++++++++ 5 files changed, 152 insertions(+) create mode 100644 docs/Api/Organization/Boards.md create mode 100644 lib/Trello/Api/Organization/Boards.php create mode 100644 test/Trello/Tests/Unit/Api/Organization/BoardsTest.php diff --git a/docs/Api/Organization.md b/docs/Api/Organization.md index 03a1154..29bf9ab 100644 --- a/docs/Api/Organization.md +++ b/docs/Api/Organization.md @@ -6,3 +6,7 @@ Trello Organization API $api->organizations()->show(string $id, array $params) ``` +### Boards API +```php +$api->members()->boards() +``` \ No newline at end of file diff --git a/docs/Api/Organization/Boards.md b/docs/Api/Organization/Boards.md new file mode 100644 index 0000000..4a97fcb --- /dev/null +++ b/docs/Api/Organization/Boards.md @@ -0,0 +1,7 @@ +Trello Member Boards API +====================== + +### Get boads related to a given organization +```php +$api->organization()->boards()->all(string $id, array $params) +``` \ No newline at end of file diff --git a/lib/Trello/Api/Organization.php b/lib/Trello/Api/Organization.php index 6fce6b1..8d5274b 100644 --- a/lib/Trello/Api/Organization.php +++ b/lib/Trello/Api/Organization.php @@ -53,4 +53,14 @@ public function show($id, array $params = array()) { return $this->get($this->getPath().'/'.rawurlencode($id), $params); } + + /** + * Boards API + * + * @return Organization\Boards + */ + public function boards() + { + return new Organization\Boards($this->client); + } } diff --git a/lib/Trello/Api/Organization/Boards.php b/lib/Trello/Api/Organization/Boards.php new file mode 100644 index 0000000..652a446 --- /dev/null +++ b/lib/Trello/Api/Organization/Boards.php @@ -0,0 +1,51 @@ +get($this->getPath($id), $params); + } + + /** + * Filter boards related to a given member + * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-boards-filter + * + * @param string $id the board's id + * @param string|array $filter array of / one of 'all', none', 'open', 'closed', 'all' + * + * @return array + */ + public function filter($id, $filter = 'all') + { + $allowed = array('all', 'members', 'organization', 'public', 'open', 'closed', 'pinned', 'unpinned', 'starred'); + $filters = $this->validateAllowedParameters($allowed, $filter, 'filter'); + + return $this->get($this->getPath($id).'/'.implode(',', $filters)); + } +} diff --git a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php new file mode 100644 index 0000000..4759212 --- /dev/null +++ b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php @@ -0,0 +1,80 @@ +getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath()) + ->will($this->returnValue($this->fakeId)); + + $this->assertEquals($this->fakeId, $api->all($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithDefaultFilter() + { + $defaultFilter = 'all'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/'.$defaultFilter) + ->will($this->returnValue($defaultFilter)); + + $this->assertEquals($defaultFilter, $api->filter($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithStringArgument() + { + $filter = 'open'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/open') + ->will($this->returnValue($filter)); + + $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithArrayArgument() + { + $filter = array('open','closed'); + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/open,closed') + ->will($this->returnValue($filter)); + + $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); + } + + protected function getApiClass() + { + return 'Trello\Api\Organization\Boards'; + } +} From 32a52717ccb7bde16bdae357e72b0c2b2af22bcb Mon Sep 17 00:00:00 2001 From: Andrzej Wojtys Date: Fri, 29 Jul 2016 12:43:43 +0300 Subject: [PATCH 2/6] added endpoint to get boards for organization --- docs/Api/Organization.md | 4 + docs/Api/Organization/Boards.md | 7 ++ lib/Trello/Api/Organization.php | 10 +++ lib/Trello/Api/Organization/Boards.php | 51 ++++++++++++ .../Unit/Api/Organization/BoardsTest.php | 80 +++++++++++++++++++ 5 files changed, 152 insertions(+) create mode 100644 docs/Api/Organization/Boards.md create mode 100644 lib/Trello/Api/Organization/Boards.php create mode 100644 test/Trello/Tests/Unit/Api/Organization/BoardsTest.php diff --git a/docs/Api/Organization.md b/docs/Api/Organization.md index 03a1154..29bf9ab 100644 --- a/docs/Api/Organization.md +++ b/docs/Api/Organization.md @@ -6,3 +6,7 @@ Trello Organization API $api->organizations()->show(string $id, array $params) ``` +### Boards API +```php +$api->members()->boards() +``` \ No newline at end of file diff --git a/docs/Api/Organization/Boards.md b/docs/Api/Organization/Boards.md new file mode 100644 index 0000000..4a97fcb --- /dev/null +++ b/docs/Api/Organization/Boards.md @@ -0,0 +1,7 @@ +Trello Member Boards API +====================== + +### Get boads related to a given organization +```php +$api->organization()->boards()->all(string $id, array $params) +``` \ No newline at end of file diff --git a/lib/Trello/Api/Organization.php b/lib/Trello/Api/Organization.php index 6fce6b1..8d5274b 100644 --- a/lib/Trello/Api/Organization.php +++ b/lib/Trello/Api/Organization.php @@ -53,4 +53,14 @@ public function show($id, array $params = array()) { return $this->get($this->getPath().'/'.rawurlencode($id), $params); } + + /** + * Boards API + * + * @return Organization\Boards + */ + public function boards() + { + return new Organization\Boards($this->client); + } } diff --git a/lib/Trello/Api/Organization/Boards.php b/lib/Trello/Api/Organization/Boards.php new file mode 100644 index 0000000..652a446 --- /dev/null +++ b/lib/Trello/Api/Organization/Boards.php @@ -0,0 +1,51 @@ +get($this->getPath($id), $params); + } + + /** + * Filter boards related to a given member + * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-boards-filter + * + * @param string $id the board's id + * @param string|array $filter array of / one of 'all', none', 'open', 'closed', 'all' + * + * @return array + */ + public function filter($id, $filter = 'all') + { + $allowed = array('all', 'members', 'organization', 'public', 'open', 'closed', 'pinned', 'unpinned', 'starred'); + $filters = $this->validateAllowedParameters($allowed, $filter, 'filter'); + + return $this->get($this->getPath($id).'/'.implode(',', $filters)); + } +} diff --git a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php new file mode 100644 index 0000000..4759212 --- /dev/null +++ b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php @@ -0,0 +1,80 @@ +getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath()) + ->will($this->returnValue($this->fakeId)); + + $this->assertEquals($this->fakeId, $api->all($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithDefaultFilter() + { + $defaultFilter = 'all'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/'.$defaultFilter) + ->will($this->returnValue($defaultFilter)); + + $this->assertEquals($defaultFilter, $api->filter($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithStringArgument() + { + $filter = 'open'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/open') + ->will($this->returnValue($filter)); + + $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); + } + + /** + * @test + */ + public function shouldFilterBoardsWithArrayArgument() + { + $filter = array('open','closed'); + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/open,closed') + ->will($this->returnValue($filter)); + + $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); + } + + protected function getApiClass() + { + return 'Trello\Api\Organization\Boards'; + } +} From 9aa0307c3fc5337cb0a08fe7c72b0d789aa5928e Mon Sep 17 00:00:00 2001 From: Andrzej Wojtys Date: Fri, 29 Jul 2016 14:36:09 +0300 Subject: [PATCH 3/6] corrected phpdocs for new endpoints --- lib/Trello/Api/Organization/Boards.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/Trello/Api/Organization/Boards.php b/lib/Trello/Api/Organization/Boards.php index 652a446..6882d7f 100644 --- a/lib/Trello/Api/Organization/Boards.php +++ b/lib/Trello/Api/Organization/Boards.php @@ -3,14 +3,10 @@ namespace Trello\Api\Organization; use Trello\Api\AbstractApi; -use Trello\Api\Board; -use Trello\Api\Member\Board\Backgrounds; -use Trello\Api\Member\Board\Stars; -use Trello\Exception\InvalidArgumentException; /** - * Trello Member Boards API - * @link https://trello.com/docs/api/member + * Trello Organization Boards API + * @link https://trello.com/docs/api/organization * * Fully implemented. */ @@ -19,8 +15,8 @@ class Boards extends AbstractApi protected $path = 'organization/#id#/boards'; /** - * Get boads related to a given member - * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-boards + * Get boads related to a given organization + * @link https://trello.com/docs/api/organization/#get-1-organizations-idorg-or-name-boards * * @param string $id the organization's id or username * @param array $params optional parameters @@ -33,8 +29,8 @@ public function all($id, array $params = array()) } /** - * Filter boards related to a given member - * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-boards-filter + * Filter boards related to a given organization + * @link https://trello.com/docs/api/organization/#get-1-organizations-idorg-or-name-boards-filter * * @param string $id the board's id * @param string|array $filter array of / one of 'all', none', 'open', 'closed', 'all' From c27f8905f766194f89ce002f18e2fdcf1d0f3c2a Mon Sep 17 00:00:00 2001 From: Andrew Wojtys Date: Tue, 2 Aug 2016 22:07:23 +0300 Subject: [PATCH 4/6] added member endpoint for organization --- lib/Trello/Api/Organization.php | 12 ++- lib/Trello/Api/Organization/Boards.php | 2 +- lib/Trello/Api/Organization/Members.php | 53 ++++++++++++ .../Unit/Api/Organization/BoardsTest.php | 2 +- .../Unit/Api/Organization/MembersTest.php | 80 +++++++++++++++++++ .../Tests/Unit/Api/OrganizationTest.php | 18 +++++ 6 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 lib/Trello/Api/Organization/Members.php create mode 100644 test/Trello/Tests/Unit/Api/Organization/MembersTest.php diff --git a/lib/Trello/Api/Organization.php b/lib/Trello/Api/Organization.php index 8d5274b..4702dc0 100644 --- a/lib/Trello/Api/Organization.php +++ b/lib/Trello/Api/Organization.php @@ -55,7 +55,7 @@ public function show($id, array $params = array()) } /** - * Boards API + * Organization Boards API * * @return Organization\Boards */ @@ -63,4 +63,14 @@ public function boards() { return new Organization\Boards($this->client); } + + /** + * Organization Members API + * + * @return Organization\Members + */ + public function members() + { + return new Organization\Members($this->client); + } } diff --git a/lib/Trello/Api/Organization/Boards.php b/lib/Trello/Api/Organization/Boards.php index 652a446..0c47b55 100644 --- a/lib/Trello/Api/Organization/Boards.php +++ b/lib/Trello/Api/Organization/Boards.php @@ -16,7 +16,7 @@ */ class Boards extends AbstractApi { - protected $path = 'organization/#id#/boards'; + protected $path = 'organizations/#id#/boards'; /** * Get boads related to a given member diff --git a/lib/Trello/Api/Organization/Members.php b/lib/Trello/Api/Organization/Members.php new file mode 100644 index 0000000..68f73b7 --- /dev/null +++ b/lib/Trello/Api/Organization/Members.php @@ -0,0 +1,53 @@ +get($this->getPath($id), $params); + } + + /** + * Filter members related to a given board + * @link https://trello.com/docs/api/board/#get-1-boards-board-id-members-filter + * + * @param string $id the board's id + * @param string|array $filter array of / one of 'none', 'normal', 'admins', 'owners', 'all' + * + * @return array + */ + public function filter($id, $filter = 'all') + { + $allowed = array('none', 'normal', 'admins', 'owners', 'all'); + $filters = $this->validateAllowedParameters($allowed, $filter, 'filter'); + + return $this->get($this->getPath($id).'/'.implode(',', $filters)); + } +} diff --git a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php index 4759212..086a6dc 100644 --- a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php +++ b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php @@ -9,7 +9,7 @@ */ class BoardsTest extends TestCase { - protected $apiPath = 'organization/#id#/boards'; + protected $apiPath = 'organizations/#id#/boards'; /** * @test diff --git a/test/Trello/Tests/Unit/Api/Organization/MembersTest.php b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php new file mode 100644 index 0000000..d443e8e --- /dev/null +++ b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php @@ -0,0 +1,80 @@ +getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath()) + ->will($this->returnValue(true)); + + $this->assertEquals(true, $api->all($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterMembersWithDefaultFilter() + { + $defaultFilter = 'all'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/'.$defaultFilter) + ->will($this->returnValue(true)); + + $this->assertEquals(true, $api->filter($this->fakeParentId)); + } + + /** + * @test + */ + public function shouldFilterMembersWithStringArgument() + { + $filter = 'admins'; + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/admins') + ->will($this->returnValue(true)); + + $this->assertEquals(true, $api->filter($this->fakeParentId, $filter)); + } + + /** + * @test + */ + public function shouldFilterMembersWithArrayArgument() + { + $filter = array('admins','owners'); + + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('get') + ->with($this->getPath().'/admins,owners') + ->will($this->returnValue(true)); + + $this->assertEquals(true, $api->filter($this->fakeParentId, $filter)); + } + + protected function getApiClass() + { + return 'Trello\Api\Organization\Members'; + } +} diff --git a/test/Trello/Tests/Unit/Api/OrganizationTest.php b/test/Trello/Tests/Unit/Api/OrganizationTest.php index 59f1346..0c803f9 100644 --- a/test/Trello/Tests/Unit/Api/OrganizationTest.php +++ b/test/Trello/Tests/Unit/Api/OrganizationTest.php @@ -23,6 +23,24 @@ public function shouldShowOrganization() $this->assertEquals($expectedArray, $api->show('54744b094fef0c7d704ca379')); } + /** + * @test + */ + public function shouldGetBoardsApiObject() + { + $api = $this->getApiMock(); + $this->assertInstanceOf('Trello\Api\Organization\Boards', $api->boards()); + } + + /** + * @test + */ + public function shouldGetMembersApiObject() + { + $api = $this->getApiMock(); + $this->assertInstanceOf('Trello\Api\Organization\Boards', $api->members()); + } + protected function getApiClass() { return 'Trello\Api\Organization'; From a499873a0c796fce516469bcb2d9e8814a4ddb8d Mon Sep 17 00:00:00 2001 From: Andrew Wojtys Date: Tue, 2 Aug 2016 22:19:51 +0300 Subject: [PATCH 5/6] corrected codestyle --- lib/Trello/Api/Organization.php | 2 +- lib/Trello/Api/Organization/Boards.php | 2 +- lib/Trello/Api/Organization/Members.php | 2 +- test/Trello/Tests/Unit/Api/Organization/BoardsTest.php | 8 ++++---- test/Trello/Tests/Unit/Api/Organization/MembersTest.php | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/Trello/Api/Organization.php b/lib/Trello/Api/Organization.php index 4702dc0..ec5cd93 100644 --- a/lib/Trello/Api/Organization.php +++ b/lib/Trello/Api/Organization.php @@ -51,7 +51,7 @@ class Organization extends AbstractApi */ public function show($id, array $params = array()) { - return $this->get($this->getPath().'/'.rawurlencode($id), $params); + return $this->get($this->getPath() . '/' . rawurlencode($id), $params); } /** diff --git a/lib/Trello/Api/Organization/Boards.php b/lib/Trello/Api/Organization/Boards.php index 11c34ff..77908ab 100644 --- a/lib/Trello/Api/Organization/Boards.php +++ b/lib/Trello/Api/Organization/Boards.php @@ -46,6 +46,6 @@ public function filter($id, $filter = 'all') $allowed = array('all', 'members', 'organization', 'public', 'open', 'closed', 'pinned', 'unpinned', 'starred'); $filters = $this->validateAllowedParameters($allowed, $filter, 'filter'); - return $this->get($this->getPath($id).'/'.implode(',', $filters)); + return $this->get($this->getPath($id) . '/' . implode(',', $filters)); } } diff --git a/lib/Trello/Api/Organization/Members.php b/lib/Trello/Api/Organization/Members.php index 68f73b7..b5189e5 100644 --- a/lib/Trello/Api/Organization/Members.php +++ b/lib/Trello/Api/Organization/Members.php @@ -48,6 +48,6 @@ public function filter($id, $filter = 'all') $allowed = array('none', 'normal', 'admins', 'owners', 'all'); $filters = $this->validateAllowedParameters($allowed, $filter, 'filter'); - return $this->get($this->getPath($id).'/'.implode(',', $filters)); + return $this->get($this->getPath($id) . '/' . implode(',', $filters)); } } diff --git a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php index 086a6dc..72650f1 100644 --- a/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php +++ b/test/Trello/Tests/Unit/Api/Organization/BoardsTest.php @@ -35,7 +35,7 @@ public function shouldFilterBoardsWithDefaultFilter() $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/'.$defaultFilter) + ->with($this->getPath() . '/' . $defaultFilter) ->will($this->returnValue($defaultFilter)); $this->assertEquals($defaultFilter, $api->filter($this->fakeParentId)); @@ -51,7 +51,7 @@ public function shouldFilterBoardsWithStringArgument() $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/open') + ->with($this->getPath() . '/open') ->will($this->returnValue($filter)); $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); @@ -62,12 +62,12 @@ public function shouldFilterBoardsWithStringArgument() */ public function shouldFilterBoardsWithArrayArgument() { - $filter = array('open','closed'); + $filter = array('open', 'closed'); $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/open,closed') + ->with($this->getPath() . '/open,closed') ->will($this->returnValue($filter)); $this->assertEquals($filter, $api->filter($this->fakeParentId, $filter)); diff --git a/test/Trello/Tests/Unit/Api/Organization/MembersTest.php b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php index d443e8e..594fab8 100644 --- a/test/Trello/Tests/Unit/Api/Organization/MembersTest.php +++ b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php @@ -35,7 +35,7 @@ public function shouldFilterMembersWithDefaultFilter() $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/'.$defaultFilter) + ->with($this->getPath() . '/' . $defaultFilter) ->will($this->returnValue(true)); $this->assertEquals(true, $api->filter($this->fakeParentId)); @@ -51,7 +51,7 @@ public function shouldFilterMembersWithStringArgument() $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/admins') + ->with($this->getPath() . '/admins') ->will($this->returnValue(true)); $this->assertEquals(true, $api->filter($this->fakeParentId, $filter)); @@ -62,12 +62,12 @@ public function shouldFilterMembersWithStringArgument() */ public function shouldFilterMembersWithArrayArgument() { - $filter = array('admins','owners'); + $filter = array('admins', 'owners'); $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') - ->with($this->getPath().'/admins,owners') + ->with($this->getPath() . '/admins,owners') ->will($this->returnValue(true)); $this->assertEquals(true, $api->filter($this->fakeParentId, $filter)); From afa65b8b04c8773eba9a17bd37a45854c009cb85 Mon Sep 17 00:00:00 2001 From: Andrzej Wojtys Date: Sat, 20 May 2017 19:11:02 +0300 Subject: [PATCH 6/6] corrected wrong apiPath and wrong needed instance from tests. Added apiPath to main abstract TestCase to avoid information that it is dynamic --- test/Trello/Tests/Unit/Api/Organization/MembersTest.php | 2 +- test/Trello/Tests/Unit/Api/OrganizationTest.php | 2 +- test/Trello/Tests/Unit/Api/TestCase.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Trello/Tests/Unit/Api/Organization/MembersTest.php b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php index 594fab8..6a1c5e9 100644 --- a/test/Trello/Tests/Unit/Api/Organization/MembersTest.php +++ b/test/Trello/Tests/Unit/Api/Organization/MembersTest.php @@ -9,7 +9,7 @@ */ class MembersTest extends TestCase { - protected $apiPath = 'organization/#id#/members'; + protected $apiPath = 'organizations/#id#/members'; /** * @test diff --git a/test/Trello/Tests/Unit/Api/OrganizationTest.php b/test/Trello/Tests/Unit/Api/OrganizationTest.php index 0c803f9..47fa62f 100644 --- a/test/Trello/Tests/Unit/Api/OrganizationTest.php +++ b/test/Trello/Tests/Unit/Api/OrganizationTest.php @@ -38,7 +38,7 @@ public function shouldGetBoardsApiObject() public function shouldGetMembersApiObject() { $api = $this->getApiMock(); - $this->assertInstanceOf('Trello\Api\Organization\Boards', $api->members()); + $this->assertInstanceOf('Trello\Api\Organization\Members', $api->members()); } protected function getApiClass() diff --git a/test/Trello/Tests/Unit/Api/TestCase.php b/test/Trello/Tests/Unit/Api/TestCase.php index 8fb4ec6..10d6494 100644 --- a/test/Trello/Tests/Unit/Api/TestCase.php +++ b/test/Trello/Tests/Unit/Api/TestCase.php @@ -6,6 +6,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { protected $fakeId = '5461efc60872da1eca5bf45c'; protected $fakeParentId = '5461efc60872da1eca5bf45d'; + protected $apiPath = null; abstract protected function getApiClass();