/** * @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); } }
public function getCountryChildrenByUuid(array $languageCodes, $uuid) { return CountryChildrenByUuid::create($this->requestHandler)->setLanguageCodes($languageCodes)->setUuid($uuid); }