function IconFinderTest::testGetFileFromUrlWarning

Test the IconFinder::getFileFromUrl method with warning.

File

core/tests/Drupal/Tests/Core/Theme/Icon/IconFinderTest.php, line 672

Class

IconFinderTest
@coversDefaultClass \Drupal\Core\Theme\Icon\IconFinder

Namespace

Drupal\Tests\Core\Theme\Icon

Code

public function testGetFileFromUrlWarning() : void {
    $method = new \ReflectionMethod(IconFinder::class, 'getFileFromUrl');
    $method->setAccessible(TRUE);
    $this->logger
        ->expects($this->once())
        ->method('warning')
        ->with('Invalid icon source: @source');
    $method->invoke($this->iconFinder, 'invalid_scheme', '', '');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.