public function XmlTest::testExecuteWithEmptyRowXpathDisplaysMessage in Views XML Backend 8
File
- tests/
src/ Unit/ Plugin/ views/ query/ XmlTest.php, line 70 - Contains \Drupal\Tests\views_xml_backend\Unit\Plugin\views\query\XmlTest.
Class
- XmlTest
- @coversDefaultClass \Drupal\views_xml_backend\Plugin\views\query\Xml @group views_xml_backend
Namespace
Drupal\Tests\views_xml_backend\Unit\Plugin\views\queryCode
public function testExecuteWithEmptyRowXpathDisplaysMessage() {
$query = $this
->getNewQueryObject([]);
$view = $this
->getMockedView();
$query
->init($view, $this
->getMockedDisplay());
$query
->build($view);
$query
->execute($view);
$this
->assertSame(1, count($this->messenger
->getMessages()));
$this
->assertSame(0, count($view->result));
}