request->ordersPacksHistory(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->success); static::assertTrue( isset($response['history']), 'API returns orders assembly history' ); static::assertTrue( isset($response['generatedAt']), 'API returns generatedAt in orders assembly history' ); } /** * @group packs_v4 */ public function testPacksCreateFailed() { $client = static::getApiClient(null, null, "v4"); $pack = [ 'itemId' => 12, 'store' => 'test', 'quantity' => 2 ]; $response = $client->request->ordersPacksCreate($pack); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(400, $response->getStatusCode()); static::assertFalse($response->success); } }