/**
  * @covers ::execute
  *
  * @dataProvider providerTestExecute
  *
  * @depends      testExecute
  */
 public function testExecuteRealRequest($form, $instanceof)
 {
     $this->sut = CountryChildrenByUuid::create($this->productionRequestHandler);
     $uuid = '15845ecf-4274-4286-b086-e407ff8207de';
     $languageCodes = ['en'];
     $limit = mt_rand(1, 9);
     $mtgObjects = $this->sut->setUuid($uuid)->setLanguageCodes($languageCodes)->setLimit($limit)->setForm($form)->execute();
     $this->assertInternalType('array', $mtgObjects);
     // If the request does not return any data, we cannot test its
     // integrity.
     $this->assertNotEmpty($mtgObjects);
     $this->assertTrue(count($mtgObjects) <= $limit);
     foreach ($mtgObjects as $mtgObject) {
         $this->assertInstanceOf($instanceof, $mtgObject);
     }
 }
예제 #2
0
파일: Client.php 프로젝트: triquanta/libizi
 public function getCountryChildrenByUuid(array $languageCodes, $uuid)
 {
     return CountryChildrenByUuid::create($this->requestHandler)->setLanguageCodes($languageCodes)->setUuid($uuid);
 }