function IconFinderTest::testFindFilesEmptyWarning
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Theme/Icon/IconFinderTest.php \Drupal\Tests\Core\Theme\Icon\IconFinderTest::testFindFilesEmptyWarning()
Test the IconFinder::findFiles method with warning when no icons found.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Icon/ IconFinderTest.php, line 692
Class
Namespace
Drupal\Tests\Core\Theme\IconCode
public function testFindFilesEmptyWarning() : void {
$method = new \ReflectionMethod(IconFinder::class, 'findFiles');
$logger = $this->createMock(LoggerInterface::class);
$logger->expects($this->once())
->method('warning');
$iconFinder = new IconFinder($this->createStub(FileUrlGeneratorInterface::class), $logger, DRUPAL_ROOT);
$method->invoke($iconFinder, self::TEST_ICONS_PATH . '/icons/empty', '*.svg');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.