From 2cae6a41bff2c7ee7b9cf6dc344b6d7b9df40bd1 Mon Sep 17 00:00:00 2001 From: Brian Retterer Date: Fri, 3 Feb 2017 10:32:34 -0500 Subject: [PATCH] Fixes #202 Change getAccounts() on organization to return Account List --- src/Resource/Organization.php | 2 +- tests/Resource/OrganizationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Resource/Organization.php b/src/Resource/Organization.php index 31b02fc..be4fd96 100644 --- a/src/Resource/Organization.php +++ b/src/Resource/Organization.php @@ -73,7 +73,7 @@ public function createAccount(Account $account, array $options = array()) public function getAccounts(array $options = []) { - return $this->getResourceProperty(self::ACCOUNTS, Stormpath::ACCOUNT, $options); + return $this->getResourceProperty(self::ACCOUNTS, Stormpath::ACCOUNT_LIST, $options); } public function getAccountStoreMappings(array $options = []) diff --git a/tests/Resource/OrganizationTest.php b/tests/Resource/OrganizationTest.php index d3cbbb4..fa560c6 100644 --- a/tests/Resource/OrganizationTest.php +++ b/tests/Resource/OrganizationTest.php @@ -102,7 +102,7 @@ public function it_can_get_all_properties() $this->assertNotNull(self::$organization->tenant); $this->assertNull(self::$organization->defaultAccountStoreMapping); $this->assertNull(self::$organization->defaultGroupStoreMapping); - $this->assertInstanceof('\Stormpath\Resource\Account', self::$organization->accounts); + $this->assertInstanceof('\Stormpath\Resource\AccountList', self::$organization->accounts); $this->assertInstanceOf('\Stormpath\Resource\GroupList', self::$organization->groups); }