From 87dc6cdb6cef83bf8af879e8b947a702f9c16481 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 4 Aug 2017 14:14:39 +0200 Subject: [PATCH 1/7] Moved test to tests --- .gitignore | 12 +- .idea/php.xml | 8 ++ composer.json | 2 +- test/JsonParserTest.php | 124 ------------------ test/resource/installation.json | 22 ---- test/resource/user_company.json | 96 -------------- {test => tests}/ApiContextHandler.php | 0 .../Model/Generated/AttachmentPublicTest.php | 0 .../Model/Generated/AvatarTest.php | 0 .../Model/Generated/CardDebitTest.php | 0 .../DraftShareInviteBankQrCodeContentTest.php | 0 .../Generated/MonetaryAccountBankTest.php | 0 .../Model/Generated/PaymentTest.php | 0 .../Model/Generated/RequestInquiryTest.php | 0 .../Model/Generated/SessionTest.php | 0 .../Model/Generated/TabUsageSingleTest.php | 0 {test => tests}/TestConfig.php | 4 +- .../resource/bunq_App_Icon_Square@4x.png | Bin {test => tests}/resource/config.example.json | 0 19 files changed, 18 insertions(+), 250 deletions(-) create mode 100644 .idea/php.xml delete mode 100644 test/JsonParserTest.php delete mode 100644 test/resource/installation.json delete mode 100644 test/resource/user_company.json rename {test => tests}/ApiContextHandler.php (100%) rename {test => tests}/Model/Generated/AttachmentPublicTest.php (100%) rename {test => tests}/Model/Generated/AvatarTest.php (100%) rename {test => tests}/Model/Generated/CardDebitTest.php (100%) rename {test => tests}/Model/Generated/DraftShareInviteBankQrCodeContentTest.php (100%) rename {test => tests}/Model/Generated/MonetaryAccountBankTest.php (100%) rename {test => tests}/Model/Generated/PaymentTest.php (100%) rename {test => tests}/Model/Generated/RequestInquiryTest.php (100%) rename {test => tests}/Model/Generated/SessionTest.php (100%) rename {test => tests}/Model/Generated/TabUsageSingleTest.php (100%) rename {test => tests}/TestConfig.php (96%) rename {test => tests}/resource/bunq_App_Icon_Square@4x.png (100%) rename {test => tests}/resource/config.example.json (100%) diff --git a/.gitignore b/.gitignore index 40ebb751..d4df2274 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .idea/**/workspace.xml .idea/**/tasks.xml .idea/dictionaries +.idea/php.xml # Sensitive or high-churn files: .idea/**/dataSources/ @@ -64,14 +65,15 @@ modules.xml # bunq context file bunq.conf example/result_attachment.jpg +bunq-test.conf +connectQr.png +config.json # Composer vendor/ # Temporary files tmp/ -bunq-test.conf -connectQr.png -.DS_Store -.idea/php.xml -config.json + +.DS_STORE + diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 00000000..d0abdd6e --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/composer.json b/composer.json index 2390ab8f..226c3300 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "autoload-dev": { "psr-4": { - "bunq\\test\\": "test/" + "bunq\\test\\": "tests/" } }, "require-dev": { diff --git a/test/JsonParserTest.php b/test/JsonParserTest.php deleted file mode 100644 index 5da22f4a..00000000 --- a/test/JsonParserTest.php +++ /dev/null @@ -1,124 +0,0 @@ - - * @since 20170630 Initial creation. - */ -class JsonParserTest extends TestCase -{ - /** - * Test constants. - */ - const JSON_ID = '{"Response": [{"Id": {"id": 37}}]}'; - const EXPECTED_ID = 37; - const JSON_UUID = '{"Response": [{"Uuid": {"uuid": "5a442b1d-3d43-4285-b532-dbb21055824a"}}]}'; - const EXPECTED_UUID = '5a442b1d-3d43-4285-b532-dbb21055824a'; - const EXPECTED_TOKEN = 'a4f9d888eea84f52722b9baf2f17c289d549edf6e0eccdbf868eb922be306fb6'; - const EXPECTED_PUBLIC_KEY = 'My server public key'; - const EXPECTED_NAME_BUNQ = 'bunq'; - const EXPECTED_EMAIL_BRAVO = 'bravo@bunq.com'; - const EXPECTED_INSTALLATION_ID = 26; - - /** - * Resource location constants. - */ - const RESOURCE_INSTALLATION_JSON = '/resource/installation.json'; - const RESOURCE_USER_COMPANY_JSON = '/resource/user_company.json'; - - /** - * Function constants. - */ - const FUNCTION_CLASS_FROM_JSON = 'classFromJson'; - const FUNCTION_FROM_JSON = 'fromJson'; - const FUNCTION_PROCESS_FOR_ID = 'processForId'; - const FUNCTION_PROCESS_FOR_UUID = 'processForUuid'; - - /** - * Call a private static method on a class. - * - * @param string $class - * @param string $method - * @param array $args - * - * @return mixed - */ - private function callPrivateStaticMethod($class, $method, array $args) - { - $reflectionClass = new \ReflectionClass($class); - $createFromJsonMethod = $reflectionClass->getMethod($method); - $createFromJsonMethod->setAccessible(true); - - return $createFromJsonMethod->invokeArgs(null, $args); - } - - /** - * Test creation of Id. - */ - public function testCreateIdFromJson() - { - $id = $this->callPrivateStaticMethod(BunqModel::class, self::FUNCTION_PROCESS_FOR_ID, [self::JSON_ID]); - - $this->assertEquals(self::EXPECTED_ID, $id); - } - - /** - * Test creation of Uuid. - */ - public function testCreateUuidFromJson() - { - $uuid = $this->callPrivateStaticMethod(BunqModel::class, self::FUNCTION_PROCESS_FOR_UUID, [self::JSON_UUID]); - - $this->assertEquals(self::EXPECTED_UUID, $uuid); - } - - /** - * Test creation of UserCompany. - */ - public function testCreateFromJson() - { - $userCompanyJson = FileUtil::getFileContents(__DIR__ . self::RESOURCE_USER_COMPANY_JSON); - /** @var UserCompany $userCompany */ - $userCompany = $this->callPrivateStaticMethod( - UserCompany::class, - self::FUNCTION_FROM_JSON, - [$userCompanyJson] - ); - - $this->assertInstanceOf(UserCompany::class, $userCompany); - $this->assertEquals(self::EXPECTED_NAME_BUNQ, $userCompany->getName()); - $this->assertEquals(self::EXPECTED_EMAIL_BRAVO, $userCompany->getAlias()[0]->getValue()); - $this->assertInstanceOf(Amount::class, $userCompany->getDailyLimitWithoutConfirmationLogin()); - } - - /** - * Test creating a predefined class from json. - */ - public function testCreateClassFormJson() - { - /** @var Installation $installation */ - $installation = $this->callPrivateStaticMethod( - BunqModel::class, - self::FUNCTION_CLASS_FROM_JSON, - [ - Installation::class, - FileUtil::getFileContents(__DIR__ . self::RESOURCE_INSTALLATION_JSON), - ] - ); - - $this->assertInstanceOf(Installation::class, $installation); - $this->assertEquals(self::EXPECTED_INSTALLATION_ID, $installation->getId()->getId()); - $this->assertEquals(self::EXPECTED_TOKEN, $installation->getToken()->getToken()); - $this->assertEquals( - self::EXPECTED_PUBLIC_KEY, - $installation->getServerPublicKey()->getServerPublicKey()->getKey() - ); - } -} diff --git a/test/resource/installation.json b/test/resource/installation.json deleted file mode 100644 index b7073856..00000000 --- a/test/resource/installation.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Response": [ - { - "Id": { - "id": 26 - } - }, - { - "Token": { - "id": 134, - "created": "2015-06-13 23:19:16.215235", - "updated": "2015-06-30 09:12:31.981573", - "token": "a4f9d888eea84f52722b9baf2f17c289d549edf6e0eccdbf868eb922be306fb6" - } - }, - { - "ServerPublicKey": { - "server_public_key": "My server public key" - } - } - ] -} diff --git a/test/resource/user_company.json b/test/resource/user_company.json deleted file mode 100644 index 6e67d3af..00000000 --- a/test/resource/user_company.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "Response": [ - { - "UserCompany": { - "id": 42, - "created": "2015-06-13 23:19:16.215235", - "updated": "2015-06-30 09:12:31.981573", - "public_uuid": "252e-fb1e-04b74214-b9e9467c3-c6d2fbf", - "name": "bunq", - "display_name": "bunq", - "public_nick_name": "bunq", - "alias": [ - { - "type": "EMAIL", - "value": "bravo@bunq.com", - "name": "" - } - ], - "chamber_of_commerce_number": "NL040492904", - "type_of_business_entity": "One man business", - "sector_of_industry": "Education", - "counter_bank_iban": "NL12BUNQ1234567890", - "avatar": { - "uuid": "5a442bed-3d43-4a85-b532-dbb251052f4a", - "anchor_uuid": "f0de919f-8c36-46ee-acb7-ea9c35c1b231", - "image": [ - { - "attachment_public_uuid": "d93e07e3-d420-45e5-8684-fc0c09a63686", - "content_type": "image/jpeg", - "height": 380, - "width": 520 - } - ] - }, - "address_main": { - "street": "Example Boulevard", - "house_number": "123a", - "po_box": "09392", - "postal_code": "1234AA", - "city": "Amsterdam", - "country": "NL" - }, - "address_postal": { - "street": "Example Boulevard", - "house_number": "123a", - "po_box": "09392", - "postal_code": "1234AA", - "city": "Amsterdam", - "country": "NL" - }, - "version_terms_of_service": "1.2", - "director_alias": { - "uuid": "252e-fb1e-04b74214-b9e9467c3-c6d2fbf", - "avatar": { - "uuid": "5a442bed-3d43-4a85-b532-dbb251052f4a", - "anchor_uuid": "f0de919f-8c36-46ee-acb7-ea9c35c1b231", - "image": [ - { - "attachment_public_uuid": "d93e07e3-d420-45e5-8684-fc0c09a63686", - "content_type": "image/jpeg", - "height": 380, - "width": 520 - } - ] - }, - "public_nick_name": "Mary", - "display_name": "Mary", - "country": "NL" - }, - "language": "en_US", - "region": "en_US", - "ubo": [ - { - "name": "A. Person", - "date_of_birth": "1990-03-27", - "nationality": "NL" - } - ], - "status": "ACTIVE", - "sub_status": "APPROVAL", - "session_timeout": 1, - "daily_limit_without_confirmation_login": { - "value": "12.50", - "currency": "EUR" - }, - "notification_filters": [ - { - "notification_delivery_method": "URL", - "notification_target": "https://my.company.com/callback-url", - "category": "PAYMENT" - } - ] - } - } - ] -} diff --git a/test/ApiContextHandler.php b/tests/ApiContextHandler.php similarity index 100% rename from test/ApiContextHandler.php rename to tests/ApiContextHandler.php diff --git a/test/Model/Generated/AttachmentPublicTest.php b/tests/Model/Generated/AttachmentPublicTest.php similarity index 100% rename from test/Model/Generated/AttachmentPublicTest.php rename to tests/Model/Generated/AttachmentPublicTest.php diff --git a/test/Model/Generated/AvatarTest.php b/tests/Model/Generated/AvatarTest.php similarity index 100% rename from test/Model/Generated/AvatarTest.php rename to tests/Model/Generated/AvatarTest.php diff --git a/test/Model/Generated/CardDebitTest.php b/tests/Model/Generated/CardDebitTest.php similarity index 100% rename from test/Model/Generated/CardDebitTest.php rename to tests/Model/Generated/CardDebitTest.php diff --git a/test/Model/Generated/DraftShareInviteBankQrCodeContentTest.php b/tests/Model/Generated/DraftShareInviteBankQrCodeContentTest.php similarity index 100% rename from test/Model/Generated/DraftShareInviteBankQrCodeContentTest.php rename to tests/Model/Generated/DraftShareInviteBankQrCodeContentTest.php diff --git a/test/Model/Generated/MonetaryAccountBankTest.php b/tests/Model/Generated/MonetaryAccountBankTest.php similarity index 100% rename from test/Model/Generated/MonetaryAccountBankTest.php rename to tests/Model/Generated/MonetaryAccountBankTest.php diff --git a/test/Model/Generated/PaymentTest.php b/tests/Model/Generated/PaymentTest.php similarity index 100% rename from test/Model/Generated/PaymentTest.php rename to tests/Model/Generated/PaymentTest.php diff --git a/test/Model/Generated/RequestInquiryTest.php b/tests/Model/Generated/RequestInquiryTest.php similarity index 100% rename from test/Model/Generated/RequestInquiryTest.php rename to tests/Model/Generated/RequestInquiryTest.php diff --git a/test/Model/Generated/SessionTest.php b/tests/Model/Generated/SessionTest.php similarity index 100% rename from test/Model/Generated/SessionTest.php rename to tests/Model/Generated/SessionTest.php diff --git a/test/Model/Generated/TabUsageSingleTest.php b/tests/Model/Generated/TabUsageSingleTest.php similarity index 100% rename from test/Model/Generated/TabUsageSingleTest.php rename to tests/Model/Generated/TabUsageSingleTest.php diff --git a/test/TestConfig.php b/tests/TestConfig.php similarity index 96% rename from test/TestConfig.php rename to tests/TestConfig.php index 96697621..7a43d2cb 100644 --- a/test/TestConfig.php +++ b/tests/TestConfig.php @@ -18,10 +18,10 @@ class TestConfig const FIELD_ALIAS = 'Alias'; const FIELD_CONTENT_TYPE = 'CONTENT_TYPE'; const FIELD_ATTACHMENT_DESCRIPTION = 'DESCRIPTION'; - const FIELD_MONETARY_ACCOUNT_ID2 = 'MA_ID2'; + const FIELD_MONETARY_ACCOUNT_ID2 = 'MONETARY_ACCOUNT_ID2'; const FIELD_TAB_USAGE_SINGLE_TEST = 'TabUsageSingleTest'; const FIELD_CASH_REGISTER_ID = 'CASH_REGISTER_ID'; - const FIELD_MONETARY_ACCOUNT_ID = 'MA_ID'; + const FIELD_MONETARY_ACCOUNT_ID = 'MONETARY_ACCOUNT_ID'; const FIELD_USER_ID = 'USER_ID'; const FIELD_API_KEY = 'API_KEY'; const FIELD_ATTACHMENT_PUBLIC_TEST = 'AttachmentPublicTest'; diff --git a/test/resource/bunq_App_Icon_Square@4x.png b/tests/resource/bunq_App_Icon_Square@4x.png similarity index 100% rename from test/resource/bunq_App_Icon_Square@4x.png rename to tests/resource/bunq_App_Icon_Square@4x.png diff --git a/test/resource/config.example.json b/tests/resource/config.example.json similarity index 100% rename from test/resource/config.example.json rename to tests/resource/config.example.json From 16951531b5cd25dc17fa73e687f0caafd5bd1e29 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 4 Aug 2017 14:31:12 +0200 Subject: [PATCH 2/7] Added tests readme --- tests/README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/README.md diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 00000000..70d6f2c5 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,53 @@ +# bunq PHP SDK +Version 0.9.0 **BETA** + +## Introduction +Hi developers! + + +Welcome to the bunq PHP SDK integration tests. Currently we are not +targeting the 100% test coverage, but rather want to be certain that the most +common scenarios can run without any errors. + + +## Scenarios + +These are the scenarios that are currently being tested: +* Create installation, session-server and device server +* Create a new MonetaryAccount +* Create a tab +* Update the tab +* Create attachment and avatar +* Request money from first MA to second MA +* Accept the request +* Make a transaction from first MA to second MA +* Create connect gr code +* Make a payment to another sandbox user +* Send a chat message in a recent payment +* Delete the current session +* Order a card with a second line + +Besides these scenarios, some code of ApiContext, ApiClient and the JSON module +are also tested :thumbs_up:. + +## Configuration + +To run the tests you must first setup the test configuration JSON. The example +of a configuration file is located at [`tests/resource/config.example.json`](./resource/config.example.json). +In order to make use of the configuration file, please copy the example to the +same directory, fill in your sandbox user data and rename the copy to config.json. +## Execution + +You can run the tests via command line: + +``` + vendor/phpunit/phpunit/phpunit test + +``` + +or via PhpStorm, but first you must configure PhpStorm by doing the following: +* Got to preferences --> Language and Frameworks --> Php --> Test Frameworks and add +`sdk_php/vendor/autoload.php` as path to script with `use composer autoloader` checked. + +Afterwards you can right click on the tests folders and should be able to run +the tests cases form the IDE. From 37fc27688ad460265906d120f545e405101285c9 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 4 Aug 2017 14:33:03 +0200 Subject: [PATCH 3/7] Added reference in main readme. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3e58b102..84c439ef 100644 --- a/README.md +++ b/README.md @@ -175,3 +175,9 @@ foreach ($monetaryAccountList as $monetaryAccount) { ##### Example See [`example/monetary_account_example.php`](./example/monetary_account_example.php) + + +## Running Tests + +Information regarding the test cases can be found in the [README.md](./tests/README.md) +located in [test](/tests). From ee565e713b88d0329bf3bb7e0333397abf07615c Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 4 Aug 2017 14:35:46 +0200 Subject: [PATCH 4/7] Removed php.xml. --- .idea/php.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/php.xml diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index d0abdd6e..00000000 --- a/.idea/php.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From f23496faeb106a91866c4ad1316070275e6c65a9 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Fri, 4 Aug 2017 14:50:32 +0200 Subject: [PATCH 5/7] Added JsonParserTest back --- tests/JsonParserTest.php | 124 +++++++++++++++++++++++++++++++ tests/README.md | 3 +- tests/resource/installation.json | 22 ++++++ tests/resource/user_company.json | 96 ++++++++++++++++++++++++ 4 files changed, 243 insertions(+), 2 deletions(-) create mode 100644 tests/JsonParserTest.php create mode 100644 tests/resource/installation.json create mode 100644 tests/resource/user_company.json diff --git a/tests/JsonParserTest.php b/tests/JsonParserTest.php new file mode 100644 index 00000000..5da22f4a --- /dev/null +++ b/tests/JsonParserTest.php @@ -0,0 +1,124 @@ + + * @since 20170630 Initial creation. + */ +class JsonParserTest extends TestCase +{ + /** + * Test constants. + */ + const JSON_ID = '{"Response": [{"Id": {"id": 37}}]}'; + const EXPECTED_ID = 37; + const JSON_UUID = '{"Response": [{"Uuid": {"uuid": "5a442b1d-3d43-4285-b532-dbb21055824a"}}]}'; + const EXPECTED_UUID = '5a442b1d-3d43-4285-b532-dbb21055824a'; + const EXPECTED_TOKEN = 'a4f9d888eea84f52722b9baf2f17c289d549edf6e0eccdbf868eb922be306fb6'; + const EXPECTED_PUBLIC_KEY = 'My server public key'; + const EXPECTED_NAME_BUNQ = 'bunq'; + const EXPECTED_EMAIL_BRAVO = 'bravo@bunq.com'; + const EXPECTED_INSTALLATION_ID = 26; + + /** + * Resource location constants. + */ + const RESOURCE_INSTALLATION_JSON = '/resource/installation.json'; + const RESOURCE_USER_COMPANY_JSON = '/resource/user_company.json'; + + /** + * Function constants. + */ + const FUNCTION_CLASS_FROM_JSON = 'classFromJson'; + const FUNCTION_FROM_JSON = 'fromJson'; + const FUNCTION_PROCESS_FOR_ID = 'processForId'; + const FUNCTION_PROCESS_FOR_UUID = 'processForUuid'; + + /** + * Call a private static method on a class. + * + * @param string $class + * @param string $method + * @param array $args + * + * @return mixed + */ + private function callPrivateStaticMethod($class, $method, array $args) + { + $reflectionClass = new \ReflectionClass($class); + $createFromJsonMethod = $reflectionClass->getMethod($method); + $createFromJsonMethod->setAccessible(true); + + return $createFromJsonMethod->invokeArgs(null, $args); + } + + /** + * Test creation of Id. + */ + public function testCreateIdFromJson() + { + $id = $this->callPrivateStaticMethod(BunqModel::class, self::FUNCTION_PROCESS_FOR_ID, [self::JSON_ID]); + + $this->assertEquals(self::EXPECTED_ID, $id); + } + + /** + * Test creation of Uuid. + */ + public function testCreateUuidFromJson() + { + $uuid = $this->callPrivateStaticMethod(BunqModel::class, self::FUNCTION_PROCESS_FOR_UUID, [self::JSON_UUID]); + + $this->assertEquals(self::EXPECTED_UUID, $uuid); + } + + /** + * Test creation of UserCompany. + */ + public function testCreateFromJson() + { + $userCompanyJson = FileUtil::getFileContents(__DIR__ . self::RESOURCE_USER_COMPANY_JSON); + /** @var UserCompany $userCompany */ + $userCompany = $this->callPrivateStaticMethod( + UserCompany::class, + self::FUNCTION_FROM_JSON, + [$userCompanyJson] + ); + + $this->assertInstanceOf(UserCompany::class, $userCompany); + $this->assertEquals(self::EXPECTED_NAME_BUNQ, $userCompany->getName()); + $this->assertEquals(self::EXPECTED_EMAIL_BRAVO, $userCompany->getAlias()[0]->getValue()); + $this->assertInstanceOf(Amount::class, $userCompany->getDailyLimitWithoutConfirmationLogin()); + } + + /** + * Test creating a predefined class from json. + */ + public function testCreateClassFormJson() + { + /** @var Installation $installation */ + $installation = $this->callPrivateStaticMethod( + BunqModel::class, + self::FUNCTION_CLASS_FROM_JSON, + [ + Installation::class, + FileUtil::getFileContents(__DIR__ . self::RESOURCE_INSTALLATION_JSON), + ] + ); + + $this->assertInstanceOf(Installation::class, $installation); + $this->assertEquals(self::EXPECTED_INSTALLATION_ID, $installation->getId()->getId()); + $this->assertEquals(self::EXPECTED_TOKEN, $installation->getToken()->getToken()); + $this->assertEquals( + self::EXPECTED_PUBLIC_KEY, + $installation->getServerPublicKey()->getServerPublicKey()->getKey() + ); + } +} diff --git a/tests/README.md b/tests/README.md index 70d6f2c5..fcd54673 100644 --- a/tests/README.md +++ b/tests/README.md @@ -41,8 +41,7 @@ same directory, fill in your sandbox user data and rename the copy to config.jso You can run the tests via command line: ``` - vendor/phpunit/phpunit/phpunit test - + vendor/phpunit/phpunit/phpunit ``` or via PhpStorm, but first you must configure PhpStorm by doing the following: diff --git a/tests/resource/installation.json b/tests/resource/installation.json new file mode 100644 index 00000000..b7073856 --- /dev/null +++ b/tests/resource/installation.json @@ -0,0 +1,22 @@ +{ + "Response": [ + { + "Id": { + "id": 26 + } + }, + { + "Token": { + "id": 134, + "created": "2015-06-13 23:19:16.215235", + "updated": "2015-06-30 09:12:31.981573", + "token": "a4f9d888eea84f52722b9baf2f17c289d549edf6e0eccdbf868eb922be306fb6" + } + }, + { + "ServerPublicKey": { + "server_public_key": "My server public key" + } + } + ] +} diff --git a/tests/resource/user_company.json b/tests/resource/user_company.json new file mode 100644 index 00000000..6e67d3af --- /dev/null +++ b/tests/resource/user_company.json @@ -0,0 +1,96 @@ +{ + "Response": [ + { + "UserCompany": { + "id": 42, + "created": "2015-06-13 23:19:16.215235", + "updated": "2015-06-30 09:12:31.981573", + "public_uuid": "252e-fb1e-04b74214-b9e9467c3-c6d2fbf", + "name": "bunq", + "display_name": "bunq", + "public_nick_name": "bunq", + "alias": [ + { + "type": "EMAIL", + "value": "bravo@bunq.com", + "name": "" + } + ], + "chamber_of_commerce_number": "NL040492904", + "type_of_business_entity": "One man business", + "sector_of_industry": "Education", + "counter_bank_iban": "NL12BUNQ1234567890", + "avatar": { + "uuid": "5a442bed-3d43-4a85-b532-dbb251052f4a", + "anchor_uuid": "f0de919f-8c36-46ee-acb7-ea9c35c1b231", + "image": [ + { + "attachment_public_uuid": "d93e07e3-d420-45e5-8684-fc0c09a63686", + "content_type": "image/jpeg", + "height": 380, + "width": 520 + } + ] + }, + "address_main": { + "street": "Example Boulevard", + "house_number": "123a", + "po_box": "09392", + "postal_code": "1234AA", + "city": "Amsterdam", + "country": "NL" + }, + "address_postal": { + "street": "Example Boulevard", + "house_number": "123a", + "po_box": "09392", + "postal_code": "1234AA", + "city": "Amsterdam", + "country": "NL" + }, + "version_terms_of_service": "1.2", + "director_alias": { + "uuid": "252e-fb1e-04b74214-b9e9467c3-c6d2fbf", + "avatar": { + "uuid": "5a442bed-3d43-4a85-b532-dbb251052f4a", + "anchor_uuid": "f0de919f-8c36-46ee-acb7-ea9c35c1b231", + "image": [ + { + "attachment_public_uuid": "d93e07e3-d420-45e5-8684-fc0c09a63686", + "content_type": "image/jpeg", + "height": 380, + "width": 520 + } + ] + }, + "public_nick_name": "Mary", + "display_name": "Mary", + "country": "NL" + }, + "language": "en_US", + "region": "en_US", + "ubo": [ + { + "name": "A. Person", + "date_of_birth": "1990-03-27", + "nationality": "NL" + } + ], + "status": "ACTIVE", + "sub_status": "APPROVAL", + "session_timeout": 1, + "daily_limit_without_confirmation_login": { + "value": "12.50", + "currency": "EUR" + }, + "notification_filters": [ + { + "notification_delivery_method": "URL", + "notification_target": "https://my.company.com/callback-url", + "category": "PAYMENT" + } + ] + } + } + ] +} From 49af07ceb3aa95de32215d91d9539ff6963df697 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Sat, 5 Aug 2017 10:12:11 +0200 Subject: [PATCH 6/7] Small changes to readme. --- README.md | 3 +-- phpunit.xml | 2 +- tests/README.md | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bf0ed58d..781b041a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # bunq PHP SDK -Version 0.9.0 **BETA** - +gs ## Introduction Hi developers! diff --git a/phpunit.xml b/phpunit.xml index 6cea3260..6a6dbfc4 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,7 +5,7 @@ cacheTokens="false"> - ./test + ./tests diff --git a/tests/README.md b/tests/README.md index fcd54673..f5554241 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,5 +1,4 @@ -# bunq PHP SDK -Version 0.9.0 **BETA** +# bunq PHP SDK tests :mag: ## Introduction Hi developers! From 59e6089979f7ebf45ee94c738be37d07d0cd6a07 Mon Sep 17 00:00:00 2001 From: Kevin Hellemun Date: Sat, 5 Aug 2017 10:34:35 +0200 Subject: [PATCH 7/7] Removed gs :laughing: --- README.md | 2 +- phpunit.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 781b041a..3fdbb5d3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # bunq PHP SDK -gs + ## Introduction Hi developers! diff --git a/phpunit.xml b/phpunit.xml index 6a6dbfc4..50025404 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -10,7 +10,7 @@ - ./lib + ./src