/**
  * @covers ::execute
  *
  * @dataProvider providerTestExecute
  *
  * @depends      testExecute
  */
 public function testExecuteRealRequest($form, $instanceof)
 {
     $this->sut = PublisherChildrenByUuid::create($this->productionRequestHandler);
     $uuid = '7d84ef00-f4f6-4b90-89d7-f20207ee9ca6';
     $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
 public function getPublisherChildrenByUuid(array $languageCodes, $uuid)
 {
     return PublisherChildrenByUuid::create($this->requestHandler)->setLanguageCodes($languageCodes)->setUuid($uuid);
 }