/**
  * 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.");
 }
Example #3
0
 /**
  * Check if gift registry type is visible.
  *
  * @param GiftRegistryType $giftRegistryType
  * @return bool
  */
 public function isGiftRegistryVisible(GiftRegistryType $giftRegistryType)
 {
     $presentOptions = $this->_rootElement->find($this->giftRegistryType)->getText();
     $presentOptions = explode("\n", $presentOptions);
     return in_array($giftRegistryType->getLabel(), $presentOptions);
 }