function SvgExtractorTest::testDiscoverIconsRemoteIgnored

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Theme/Icon/Plugin/SvgExtractorTest.php \Drupal\Tests\Core\Theme\Icon\Plugin\SvgExtractorTest::testDiscoverIconsRemoteIgnored()

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

File

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

Class

SvgExtractorTest
Tests 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.