Exemplo n.º 1
0
 /**
  * @group backend-issues
  */
 public function testListOfCompanies()
 {
     try {
         $companiesList = PromisePay::Company()->getList(array('limit' => 2, 'offset' => 0));
         $this->assertNotEmpty($companiesList);
         $this->assertTrue(is_array($companiesList));
         $this->assertTrue(count($companiesList) > 0);
         $this->assertNotNull($companiesList[0]['id']);
     } catch (\PromisePay\Exception\Api $e) {
         $meta = PromisePay::getDebugData();
         // server usually responds with 504 on this test
         $this->assertEquals(substr($meta->code, 0, 1), '5');
         //print_r($meta);
         $this->markTestIncomplete();
     }
 }