protected function UnitTestBase::assertEmptyFeedMessage in Feeds extensible parsers 8
Asserts that the empty message is correct.
Parameters
array $messages: The list of error messages.
6 calls to UnitTestBase::assertEmptyFeedMessage()
- HtmlParserTest::testEmptyFeed in tests/
src/ Unit/ Feeds/ Parser/ HtmlParserTest.php - Tests empty feed handling.
- JmesPathParserTest::testEmptyFeed in tests/
src/ Unit/ Feeds/ Parser/ JmesPathParserTest.php - Tests empty feed handling.
- JsonPathLinesParserTest::testEmptyFeed in tests/
src/ Unit/ Feeds/ Parser/ JsonPathLinesParserTest.php - Tests empty feed handling.
- JsonPathParserTest::testEmptyFeed in tests/
src/ Unit/ Feeds/ Parser/ JsonPathParserTest.php - Tests empty feed handling.
- QueryPathHtmlParserTest::testEmptyFeed in tests/
src/ Unit/ Feeds/ Parser/ QueryPathHtmlParserTest.php - Tests empty feed handling.
File
- tests/
src/ Unit/ UnitTestBase.php, line 64
Class
- UnitTestBase
- Base class for units tests.
Namespace
Drupal\Tests\feeds_ex\UnitCode
protected function assertEmptyFeedMessage(array $messages) {
$this
->assertCount(1, $messages, strtr('There is one message (actual: @actual).', [
'@actual' => count($messages),
]));
$this
->assertSame((string) $messages[0]['message'], 'The feed is empty.', 'Message text is correct.');
$this
->assertSame($messages[0]['type'], 'warning', 'Message type is warning.');
$this
->assertFalse($messages[0]['repeat'], 'Repeat is set to false.');
}