request->telephonyCallEvent( '+79999999999', 'in', ['101'], 'failed', '+74950000000' ); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } /** * Upload test * * @group telephony * * @return void */ public function testTelephonyUpload() { self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $response = $client->request->telephonyCallsUpload( [ [ 'date' => '2016-07-22 00:18:00', 'type' => 'in', 'phone' => '+79999999999', 'code' => '101', 'result' => 'answered', 'externalId' => rand(10, 100), 'recordUrl' => 'http://download.retailcrm.pro/api-client-files/beep1.mp3' ], [ 'date' => '2016-07-22 00:24:00', 'type' => 'in', 'phone' => '+79999999999', 'code' => '101', 'result' => 'answered', 'externalId' => rand(10, 100), 'recordUrl' => 'http://download.retailcrm.pro/api-client-files/beep2.mp3' ] ] ); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } /** * Manager test * * @group telephony * * @return void */ public function testTelephonyManager() { self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $response = $client->request->telephonyCallManager('+79999999999', 1); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } /** * @group telephony_v5 * @expectedException \InvalidArgumentException */ public function testTelephonySettingsGet() { $client = static::getApiClient(); $client->request->telephonySettingsGet(self::TEL_CODE); } }