/** * @covers ::execute * * @dataProvider providerTestExecute * * @depends testExecute */ public function testExecuteRealRequest($form, $instanceof) { $this->sut = MtgObjectsByUuids::create($this->productionRequestHandler); $uuids = ['bcf57367-77f6-4e39-9da6-1b481826501f', '9a7d0fd4-aa50-4d12-a8fa-26f080cd7e0c']; $languageCodes = ['en']; $mtgObjects = $this->sut->setUuids($uuids)->setLanguageCodes($languageCodes)->setForm($form)->execute(); $this->assertInternalType('array', $mtgObjects); // If the request does not return any data, we cannot test its // integrity. $this->assertNotEmpty($mtgObjects); foreach ($mtgObjects as $mtgObject) { $this->assertInstanceOf($instanceof, $mtgObject); } }
public function getMtgObjectsByUuids(array $languageCodes, array $uuids) { return MtgObjectsByUuids::create($this->requestHandler)->setLanguageCodes($languageCodes)->setUuids($uuids); }