Example #1
0
 /**
  * Verify category Search Engine Optimization data:
  * # URL
  * # Meta Title
  *
  * @param array $categoryData
  * @return array
  */
 protected function verifySearchEngineOptimization(array $categoryData)
 {
     $errorMessage = [];
     $categoryUrl = $this->getCategoryUrl($this->category);
     if ($categoryUrl != $this->browser->getUrl()) {
         $errorMessage[] = 'Wrong page URL.' . "\nExpected: " . $categoryUrl . "\nActual: " . $this->browser->getUrl();
     }
     if (isset($categoryData['meta_title'])) {
         $actual = $this->categoryViewPage->getMetaInformation()->getTitle();
         if ($categoryData['meta_title'] != $actual) {
             $errorMessage[] = 'Wrong page title.' . "\nExpected: " . $categoryData['meta_title'] . "\nActual: " . $actual;
         }
     }
     return $errorMessage;
 }