public function testMixedValidInvalidToArray() { $client = new HttpClient(new ConnectionConfig(getenv('OPILO_URL')), new Account(getenv('OPILO_USERNAME'), getenv('OPILO_PASSWORD'))); $response = $client->sendSMS(getenv('PANEL_LINE'), 'junk,' . getenv('DESTINATION'), 'text'); $this->assertCount(2, $response); $this->assertInstanceOf(SendError::class, $response[0]); $this->assertEquals(SendError::ERROR_INVALID_DESTINATION, $response[0]->getError()); $this->assertInstanceOf(SMSId::class, $response[1]); }
public function testReceive() { $firstResponse = $this->client->receive(0, Inbox::PAGE_LIMIT)->getMessages(); $this->assertGreaterThan($firstResponse[1]->getOpiloId(), $firstResponse[0]->getOpiloId()); $secondResponse = $this->client->receive(1, Inbox::PAGE_LIMIT)->getMessages(); $this->assertEquals($firstResponse[1]->getOpiloId(), $secondResponse[0]->getOpiloId()); }