/**
  * Clear data after test.
  *
  * @return void
  */
 public function tearDown()
 {
     if (!$this->targetRule instanceof TargetRule) {
         return;
     }
     $this->targetRuleIndex->open();
     $this->targetRuleIndex->getTargetRuleGrid()->searchAndOpen(['name' => $this->targetRule->getName()]);
     $this->targetRuleEdit->getPageActions()->deleteAndAcceptAlert();
 }
 /**
  * Assert that displayed target rule data on edit page equals passed from fixture.
  *
  * @param TargetRuleIndex $targetRuleIndex
  * @param TargetRule $targetRule
  * @param TargetRuleEdit $targetRuleEdit
  * @param array $replacementData
  * @return void
  */
 public function processAssert(TargetRuleIndex $targetRuleIndex, TargetRule $targetRule, TargetRuleEdit $targetRuleEdit, array $replacementData)
 {
     $fixtureData = $this->prepareData($targetRule->getData(), $replacementData['rule_information']);
     $targetRuleIndex->open();
     $targetRuleIndex->getTargetRuleGrid()->searchAndOpen(['name' => $targetRule->getName()]);
     $formData = $targetRuleEdit->getTargetRuleForm()->getData();
     $errors = $this->verifyData($fixtureData, $formData);
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }