/** * Verify displayed product special price on product page(front-end) equals passed from fixture * * @return string|null */ protected function verifySpecialPrice() { if (!$this->product->hasData('special_price')) { return null; } $fixtureProductSpecialPrice = $this->product->getSpecialPrice(); $fixtureProductSpecialPrice = number_format($fixtureProductSpecialPrice, 2); $formProductSpecialPrice = $this->productView->getPriceBlock()->getSpecialPrice(); if ($fixtureProductSpecialPrice == $formProductSpecialPrice) { return null; } return "Displayed product special price on product page(front-end) not equals passed from fixture. " . "Actual: {$formProductSpecialPrice}, expected: {$fixtureProductSpecialPrice}."; }