function SvgExtractorTest::testDiscoverIconsRemoteIgnored

Test the SvgExtractor::discoverIcons() method with remote svg.

File

core/tests/Drupal/Tests/Core/Theme/Icon/Plugin/SvgExtractorTest.php, line 147

Class

SvgExtractorTest
@coversDefaultClass \Drupal\Core\Theme\Plugin\IconExtractor\SvgExtractor

Namespace

Drupal\Tests\Core\Theme\Icon\Plugin

Code

public function testDiscoverIconsRemoteIgnored() : void {
    $svgExtractorPlugin = new SvgExtractor([
        'id' => $this->pluginId,
        'config' => [
            'sources' => [
                'http://foo/bar.svg',
                'https://foo/bar.svg',
                'https://your-bucket-name.s3.amazonaws.com/foo/bar.svg',
            ],
        ],
        'template' => '_foo_',
        'relative_path' => 'modules/my_module',
    ], $this->pluginId, [], $this->iconFinder);
    $icons = $svgExtractorPlugin->discoverIcons();
    $this->assertEmpty($icons);
}

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