public function testGetSub() { $postage = new Product(Config::get()); $response = $postage->getSub(); $this->assertTrue(is_array($response)); foreach ($response as $value) { $this->assertArrayHasKey('id', $value); $this->assertArrayHasKey('name', $value); } $postage = new Product(Config::get()); $response = $postage->getSub(537891948); $this->assertTrue(is_array($response)); foreach ($response as $value) { $this->assertArrayHasKey('id', $value); $this->assertArrayHasKey('name', $value); } return $response[2]['id']; }