/** * Assert that gift registry type form data is equal to fixture data. * * @param GiftRegistryType $giftRegistryType * @param BackendGiftRegistryIndex $giftRegistryIndex * @param GiftRegistryNew $giftRegistryNew * @return void */ public function processAssert(GiftRegistryType $giftRegistryType, BackendGiftRegistryIndex $giftRegistryIndex, GiftRegistryNew $giftRegistryNew) { $giftRegistryIndex->getGiftRegistryGrid()->searchAndOpen(['label' => $giftRegistryType->getLabel()]); $formData = $giftRegistryNew->getGiftRegistryForm()->getData($giftRegistryType); $fixtureData = $giftRegistryType->getData(); $errors = $this->verifyData($fixtureData, $formData); \PHPUnit_Framework_Assert::assertEmpty($errors, $errors); }
/** * Assert that created gift registry type can be found at gift registry grid in backend. * * @param BackendGiftRegistryIndex $giftRegistryIndex * @param GiftRegistryType $giftRegistryType * @return void */ public function processAssert(BackendGiftRegistryIndex $giftRegistryIndex, GiftRegistryType $giftRegistryType) { $giftRegistryIndex->open(); $filter = ['label' => $giftRegistryType->getLabel()]; \PHPUnit_Framework_Assert::assertTrue($giftRegistryIndex->getGiftRegistryGrid()->isRowVisible($filter), "Gift registry type '{$giftRegistryType->getLabel()}' is not present in grid."); }