/** * @param string $row * @param string $column * @param string $titleExpectation * * @throws ExpectationException */ public function assertColumnContainsImage($row, $column, $titleExpectation) { $node = $this->datagrid->getColumnNode($column, $row); if ('**empty**' === $titleExpectation) { if (null !== $node->find('css', 'img')) { throw $this->createExpectationException(sprintf('Expecting column "%s" to be empty, but one image found.', $column)); } } else { $locator = sprintf('img[title="%s"]', $titleExpectation); if (null === $node->find('css', $locator)) { throw $this->createExpectationException(sprintf('Expecting column "%s" to contain "%s".', $column, $titleExpectation)); } } }