From 9fdb2f0ada46be265b8a5c9dd0330f87dccf5da4 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Sat, 9 Jan 2016 15:24:12 +0300 Subject: [PATCH] packs tests --- phpunit.xsd | 251 +++++++++++++++++++ tests/RetailCrm/Tests/ApiClientPacksTest.php | 29 +++ 2 files changed, 280 insertions(+) create mode 100644 phpunit.xsd create mode 100644 tests/RetailCrm/Tests/ApiClientPacksTest.php diff --git a/phpunit.xsd b/phpunit.xsd new file mode 100644 index 0000000..0cfae85 --- /dev/null +++ b/phpunit.xsd @@ -0,0 +1,251 @@ + + + + + This Schema file defines the rules by which the XML configuration file of PHPUnit 3.7 may be structured. + + + + + + Root Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The main type specifying the document structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/RetailCrm/Tests/ApiClientPacksTest.php b/tests/RetailCrm/Tests/ApiClientPacksTest.php new file mode 100644 index 0000000..abc73ed --- /dev/null +++ b/tests/RetailCrm/Tests/ApiClientPacksTest.php @@ -0,0 +1,29 @@ +ordersPacksHistory(); + $this->assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + $this->assertEquals(200, $response->getStatusCode()); + $this->assertTrue($response->success); + $this->assertTrue( + isset($response['history']), + 'API returns orders assembly history' + ); + $this->assertTrue( + isset($response['generatedAt']), + 'API returns generatedAt in orders assembly history' + ); + } +} \ No newline at end of file