/** * Assert that created Synonym Group can be found in grid via: synonyms. * * @param SynonymGroup $synonymGroup * @param SynonymGroupIndex $synonymGroupIndex * @return void * */ public function processAssert(SynonymGroup $synonymGroup, SynonymGroupIndex $synonymGroupIndex) { $synonymGroupIndex->open(); $data = $synonymGroup->getData(); $filter = ['synonyms' => $data['synonyms']]; $synonymGroupIndex->getSynonymGroupGrid()->search($filter); \PHPUnit_Framework_Assert::assertTrue($synonymGroupIndex->getSynonymGroupGrid()->isRowVisible($filter, false, false), 'Synonym Group with ' . 'synonyms \'' . $filter['synonyms'] . '\', ' . 'is absent in Synonym grid.'); }
/** * Assert that after save Synonym Group successful message appears. * * @param SynonymGroupIndex $synonymGroupIndex * @return void */ public function processAssert(SynonymGroupIndex $synonymGroupIndex) { $actualMessage = $synonymGroupIndex->getMessagesBlock()->getSuccessMessage(); \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_SAVE_MESSAGE, $actualMessage, 'Wrong success message is displayed.' . "\nExpected: " . self::SUCCESS_SAVE_MESSAGE . "\nActual: " . $actualMessage); }