diff --git a/.gitattributes b/.gitattributes index 4e79598..958f835 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,8 +2,17 @@ # https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html # Ignore all test and documentation with "export-ignore". -/.gitattributes export-ignore -/.gitignore export-ignore -/.travis.yml export-ignore -/phpunit.xml.dist export-ignore -/tests export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.github export-ignore +/.gitignore export-ignore +/.php-cs-fixer.dist.php export-ignore +/example export-ignore +/phpunit.xml.dist export-ignore +/tests export-ignore + +# All test snapshots and text stubs must have LF line endings +tests/**/__snapshots__/** text eol=lf +tests/**/stubs/** text eol=lf +tests/**/stubs/**/*.jpg binary +tests/**/stubs/**/*.png binary diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2e6052a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependencies" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..d6598fb --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,32 @@ +name: dependabot-auto-merge +on: pull_request_target + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1.3.6 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Auto-merge Dependabot PRs for semver-minor updates + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Auto-merge Dependabot PRs for semver-patch updates + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/fix-php-code-style-issues.yml similarity index 53% rename from .github/workflows/php-cs-fixer.yml rename to .github/workflows/fix-php-code-style-issues.yml index 502dbe7..f942563 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -1,21 +1,22 @@ -name: Check & fix styling +name: Fix PHP code style issues -on: [push] +on: + push: + paths: + - '**.php' jobs: - php-cs-fixer: + php-code-styling: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} - - name: Run PHP CS Fixer - uses: docker://oskarstark/php-cs-fixer-ga - with: - args: --config=.php-cs-fixer.dist.php --allow-risky=yes + - name: Fix PHP code style issues + uses: aglipanci/laravel-pint-action@2.1.0 - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2bb0752..6f8ddd5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,6 +1,10 @@ name: run-tests -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: + branches: [master] jobs: test: @@ -9,37 +13,38 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.1] - laravel: [9.*, 8.*] - dependency-version: [prefer-lowest, prefer-stable] + php: [8.2] + laravel: [10.*] + stability: [prefer-lowest, prefer-stable] include: - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: ^6.23 + - laravel: 10.* + testbench: 8.* - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - - name: Execute tests - run: vendor/bin/phpunit + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: List Installed Dependencies + run: composer show -D + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index 718cfc3..039f9e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -.php-cs-fixer.cache -.phpunit.result.cache +.phpunit.cache composer.lock +coverage +docs +phpunit.xml +psalm.xml vendor diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index f5124b6..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,42 +0,0 @@ -in([ - __DIR__ . '/src', - __DIR__ . '/tests', - ]) - ->notPath('bootstrap/*') - ->notPath('storage/*') - ->notPath('resources/view/mail/*') - ->name('*.php') - ->notName('*.blade.php') - ->ignoreDotFiles(true) - ->ignoreVCS(true) -; - -return (new Config()) - ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'no_unused_imports' => true, - 'not_operator_with_successor_space' => true, - 'trailing_comma_in_multiline' => true, - 'phpdoc_scalar' => true, - 'unary_operator_spaces' => true, - 'binary_operator_spaces' => true, - 'blank_line_before_statement' => [ - 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], - ], - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_var_without_name' => true, - 'method_argument_space' => [ - 'on_multiline' => 'ensure_fully_multiline', - 'keep_multiple_spaces_after_comma' => true, - ], - 'single_trait_insert_per_statement' => true, - ]) - ->setFinder($finder); diff --git a/composer.json b/composer.json index 003ac5f..8a929e7 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,14 @@ } ], "require": { - "php": "^8.1", - "illuminate/support": "^8.75|^9.0" + "php": "^8.2", + "illuminate/support": "^10.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.2", - "orchestra/testbench": "^6.23|^7.0", - "phpunit/phpunit": "^9.5", - "spatie/phpunit-snapshot-assertions": "^4.2" + "laravel/pint": "^1.0", + "orchestra/testbench": "^8.0", + "phpunit/phpunit": "^10.0", + "spatie/phpunit-snapshot-assertions": "^5.0" }, "config": { "sort-packages": true @@ -42,7 +42,7 @@ } }, "scripts": { - "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes", + "format": "vendor/bin/pint", "test": "vendor/bin/phpunit", "test-coverage": "vendor/bin/phpunit --coverage-html coverage" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0f47698..2a27ac7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + src/ diff --git a/resources/views/spritesheet.blade.php b/resources/views/spritesheet.blade.php index 34d1edc..c97bcf5 100644 --- a/resources/views/spritesheet.blade.php +++ b/resources/views/spritesheet.blade.php @@ -1,4 +1,4 @@ -') && ! Str::contains($content, 'svg-stylesheet')) { // We insert it in the top part of the as then custom CSS will overrule ours - $response->setContent(str_replace('', '' . $this->stylesheet(), $content)); + $response->setContent(str_replace('', ''.$this->stylesheet(), $content)); } return $response; @@ -63,14 +61,14 @@ private function injectSpritesheet(SymfonyBaseResponse $response): SymfonyBaseRe if (! empty($matches[0]) && ! empty($matches[1]) && ! empty($matches[2])) { // We insert it in the top part of the as then the CSS can load first before the SVG body is sent. - $response->setContent($matches[0] . $matches[1] . $this->spritesheet->toHtml() . $matches[2]); + $response->setContent($matches[0].$matches[1].$this->spritesheet->toHtml().$matches[2]); } } return $response; } - private function stylesheet() + private function stylesheet(): HtmlString { return $this->spritesheet->toStylesheet(); } diff --git a/src/Pack.php b/src/Pack.php index ae116c9..3d3fc1e 100644 --- a/src/Pack.php +++ b/src/Pack.php @@ -5,32 +5,29 @@ class Pack { public string $name; + public array $paths = []; + /** * Auto size on viewbox means that the SVG will have an automatically generated width based on the viewport width and height. * We'll automatically calculate the width, and add a CSS class to set the vertical alignment and height to a sensible default as well. * * The most common use case is when using the Font Awesome 5 set. - * - * @var bool */ public bool $autoSizeOnViewBox = false; + /** * Auto discovery defines is the pack is searched when no specific pack is defined in the icon lookup. * Use case: we have a pack available but want to ensure the user must opt-in to it's usage. - * - * @var bool */ public bool $autoDiscovery = true; public function lookup(string $name): ?string { - return StaticCache::once(static::class . '@lookup-' . $this->name . '-' . $name, function () use ($name) { - return collect($this->paths)->map(function (string $path) use ($name) { - return rtrim($path, '/') . '/' . $name . '.svg'; - })->first(function ($filePath) { - return file_exists($filePath); - }); + return StaticCache::once(static::class.'@lookup-'.$this->name.'-'.$name, function () use ($name) { + return collect($this->paths) + ->map(fn (string $path) => rtrim($path, '/').'/'.$name.'.svg') + ->first(fn ($filePath) => file_exists($filePath)); }); } } diff --git a/src/Spritesheet.php b/src/Spritesheet.php index 3751cb2..fd683c4 100644 --- a/src/Spritesheet.php +++ b/src/Spritesheet.php @@ -18,13 +18,15 @@ public function queue(Svg $svg): void public function __toString() { - throw new LogicException("Spritesheet __toString disabled. Specify `toHtml` or `toStylesheet` manually"); + throw new LogicException('Spritesheet __toString disabled. Specify `toHtml` or `toStylesheet` manually'); } public function toHtml(): HtmlString { // Regex ported from https://github.com/Hedronium/SpacelessBlade/blob/master/src/SpacelessBladeProvider.php - return new HtmlString(preg_replace('/>\\s+<', view('svg::spritesheet', ['spritesheet' => $this])->render())); + return new HtmlString(preg_replace('/>\\s+<', view('svg::spritesheet', [ + 'spritesheet' => $this, + ])->render())); } public function toStylesheet(): HtmlString diff --git a/src/Svg.php b/src/Svg.php index 8f15639..e505ec5 100644 --- a/src/Svg.php +++ b/src/Svg.php @@ -12,17 +12,17 @@ class Svg implements Htmlable, Renderable { - public string $name; public ?Pack $pack = null; + /** @readonly */ public string $contents; + public bool $inline = false; + private Collection $attributes; - public function __construct(string $name) + public function __construct(public string $name) { - $this->name = $name; - $this->attributes = collect(); // PHP 7.4 doesn't support defaults by function. // Automatically inline SVGs in Ajax requests or Livewire requests, as the spritesheet isn't up-to-date then. @@ -33,12 +33,13 @@ public function __construct(string $name) public function id(): string { - return $this->pack->name . '-' . $this->name; + return $this->pack->name.'-'.$this->name; } /** - * @param string|Pack $pack + * @param string|Pack $pack * @return $this + * * @throws Exceptions\PackNotFoundException */ public function pack($pack): self @@ -98,13 +99,13 @@ public function render() return $this->toHtml(); } - private function prepareForRendering() + private function prepareForRendering(): void { if (empty($this->pack)) { // No specific pack is defined. // We search for the first pack that has auto discovery enabled and has the icon available. foreach (app(PackCollection::class)->filter->autoDiscovery as $pack) { - if ($path = $pack->lookup($this->name)) { + if ($pack->lookup($this->name)) { $this->pack = $pack; break; @@ -116,26 +117,24 @@ private function prepareForRendering() throw SvgNotFoundException::create($this->name); } - $this->contents = StaticCache::once(static::class . '@' . $this->id() . '-' . $path, function () use ($path) { - return file_get_contents($path); - }); + $this->contents = StaticCache::once(static::class.'@'.$this->id().'-'.$path, fn () => file_get_contents($path)); } - public function inner() + public function inner(): string { $this->ensureRendered(); return InnerParser::parse($this); } - public function viewBox() + public function viewBox(): array { $this->ensureRendered(); return ViewboxParser::parse($this); } - private function sizingAttributes() + private function sizingAttributes(): string { $this->ensureRendered(); @@ -147,7 +146,7 @@ private function sizingAttributes() [$width, $height] = [$svgDom->getAttribute('width'), $svgDom->getAttribute('height')]; - return ($width ? sprintf(' width="%s"', $width) : null) . ($height ? sprintf(' height="%s"', $height) : null); + return ($width ? sprintf(' width="%s"', $width) : null).($height ? sprintf(' height="%s"', $height) : null); } private function renderAttributes() @@ -160,9 +159,7 @@ private function renderAttributes() ]) ->pipe(function (Collection $collection) { return $collection->merge( - $this->attributes->map(function ($value, $key) use ($collection) { - return trim($collection->get($key) . ' ' . $value); - }) + $this->attributes->map(fn ($value, $key) => trim($collection->get($key).' '.$value)) ); }) ->filter() @@ -177,7 +174,7 @@ private function renderAttributes() ->implode(' '); } - private function ensureRendered() + private function ensureRendered(): void { if (empty($this->contents)) { throw SvgMustBeRendered::create($this); diff --git a/src/SvgServiceProvider.php b/src/SvgServiceProvider.php index df045f5..f5066e7 100644 --- a/src/SvgServiceProvider.php +++ b/src/SvgServiceProvider.php @@ -11,15 +11,13 @@ class SvgServiceProvider extends ServiceProvider public function boot() { $this->publishes([ - __DIR__ . '/../config/svg.php' => config_path('svg.php'), + __DIR__.'/../config/svg.php' => config_path('svg.php'), ]); - $this->mergeConfigFrom(__DIR__ . '/../config/svg.php', 'svg'); + $this->mergeConfigFrom(__DIR__.'/../config/svg.php', 'svg'); - $this->loadViewsFrom(__DIR__ . '/../resources/views', 'svg'); + $this->loadViewsFrom(__DIR__.'/../resources/views', 'svg'); - $this->app->singleton(PackCollection::class, function () { - return PackCollection::fromConfig(config('svg.packs', [])); - }); + $this->app->singleton(PackCollection::class, fn () => PackCollection::fromConfig(config('svg.packs', []))); $this->app->singleton(Spritesheet::class); $this->registerMiddleware(); diff --git a/src/ViewboxParser.php b/src/ViewboxParser.php index 5ee5599..bf78f45 100644 --- a/src/ViewboxParser.php +++ b/src/ViewboxParser.php @@ -8,7 +8,7 @@ class ViewboxParser { public static function parse(Svg $svg) { - return StaticCache::once(static::class . '@parse' . $svg->id(), function () use ($svg) { + return StaticCache::once(static::class.'@parse'.$svg->id(), function () use ($svg) { $viewBox = DomParser::node($svg)->getAttribute('viewBox'); $viewBoxParts = array_map('intval', explode(' ', $viewBox)); diff --git a/tests/PackTest.php b/tests/PackTest.php index 05eb31d..2913db8 100644 --- a/tests/PackTest.php +++ b/tests/PackTest.php @@ -8,7 +8,7 @@ class PackTest extends TestCase { protected array $packs = [ - 'custom' => __DIR__ . '/fixtures/custom', + 'custom' => __DIR__.'/fixtures/custom', ]; public function test_get_all_packs() @@ -33,7 +33,7 @@ public function test_exception_on_non_existing_pack() public function test_manually_adding_pack() { app(PackCollection::class)->addPack('icons', [ - 'path' => __DIR__ . '/fixtures/icons', + 'path' => __DIR__.'/fixtures/icons', ]); $this->assertNotEmpty(svg('clock')->pack('icons')); @@ -43,7 +43,7 @@ public function test_manually_adding_packs() { app(PackCollection::class)->addPacks([ 'icons' => [ - 'path' => __DIR__ . '/fixtures/icons', + 'path' => __DIR__.'/fixtures/icons', ], ]); diff --git a/tests/Snapshots.php b/tests/Snapshots.php deleted file mode 100644 index 243fa00..0000000 --- a/tests/Snapshots.php +++ /dev/null @@ -1,19 +0,0 @@ -getShortName() . '--' . - $this->getName() . '--' . - substr(md5(PHP_EOL), 0, 2) . '--' . - $this->snapshotIncrementor; - } -} diff --git a/tests/SpritesheetTest.php b/tests/SpritesheetTest.php index 6946363..788f8df 100644 --- a/tests/SpritesheetTest.php +++ b/tests/SpritesheetTest.php @@ -3,10 +3,11 @@ namespace Enflow\Svg\Test; use Enflow\Svg\Spritesheet; +use Spatie\Snapshots\MatchesSnapshots; class SpritesheetTest extends TestCase { - use Snapshots; + use MatchesSnapshots; public function test_spritesheet() { diff --git a/tests/SvgTest.php b/tests/SvgTest.php index 797df78..74f2360 100644 --- a/tests/SvgTest.php +++ b/tests/SvgTest.php @@ -4,22 +4,22 @@ use Enflow\Svg\Exceptions\SvgMustBeRendered; use Enflow\Svg\Exceptions\SvgNotFoundException; -use Enflow\Svg\Spritesheet; use Enflow\Svg\Svg; +use Spatie\Snapshots\MatchesSnapshots; class SvgTest extends TestCase { - use Snapshots; + use MatchesSnapshots; protected array $packs = [ - 'custom' => __DIR__ . '/fixtures/custom', + 'custom' => __DIR__.'/fixtures/custom', 'auto-discovery-disabled' => [ - 'path' => __DIR__ . '/fixtures/icons', + 'path' => __DIR__.'/fixtures/icons', 'auto_size_on_viewbox' => true, 'auto_discovery' => false, ], 'icons' => [ - 'path' => __DIR__ . '/fixtures/icons', + 'path' => __DIR__.'/fixtures/icons', 'auto_size_on_viewbox' => true, ], ]; @@ -70,8 +70,8 @@ public function test_all_render_methods_contain_the_same() $svg = svg('clock'); $this->assertEquals($svg->render(), $svg->toHtml()); - $this->assertEquals($svg->toHtml(), (string)$svg); - $this->assertEquals($svg->render(), (string)$svg); + $this->assertEquals($svg->toHtml(), (string) $svg); + $this->assertEquals($svg->render(), (string) $svg); } public function test_that_every_render_is_the_same() diff --git a/tests/TestCase.php b/tests/TestCase.php index 4eba006..4910d0d 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,9 +7,9 @@ abstract class TestCase extends TestbenchTestCase { protected array $packs = [ - 'custom' => __DIR__ . '/fixtures/custom', + 'custom' => __DIR__.'/fixtures/custom', 'icons' => [ - 'path' => __DIR__ . '/fixtures/icons', + 'path' => __DIR__.'/fixtures/icons', 'auto_size_on_viewbox' => true, ], ]; diff --git a/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--1.txt b/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--1.txt deleted file mode 100644 index 4920f56..0000000 --- a/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--1.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/__snapshots__/SpritesheetTest__test_spritesheet__1.txt b/tests/__snapshots__/SpritesheetTest__test_spritesheet__1.txt new file mode 100644 index 0000000..1742e33 --- /dev/null +++ b/tests/__snapshots__/SpritesheetTest__test_spritesheet__1.txt @@ -0,0 +1 @@ + diff --git a/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--2.xml b/tests/__snapshots__/SpritesheetTest__test_spritesheet__2.xml similarity index 100% rename from tests/__snapshots__/SpritesheetTest--test_spritesheet--68--2.xml rename to tests/__snapshots__/SpritesheetTest__test_spritesheet__2.xml diff --git a/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--3.txt b/tests/__snapshots__/SpritesheetTest__test_spritesheet__3.txt similarity index 68% rename from tests/__snapshots__/SpritesheetTest--test_spritesheet--68--3.txt rename to tests/__snapshots__/SpritesheetTest__test_spritesheet__3.txt index 912f5b5..07da82a 100644 --- a/tests/__snapshots__/SpritesheetTest--test_spritesheet--68--3.txt +++ b/tests/__snapshots__/SpritesheetTest__test_spritesheet__3.txt @@ -1 +1 @@ - + diff --git a/tests/__snapshots__/SvgTest--test_auto_size_for_svg_rendering--68--1.xml b/tests/__snapshots__/SvgTest__test_auto_size_for_svg_rendering__1.xml similarity index 100% rename from tests/__snapshots__/SvgTest--test_auto_size_for_svg_rendering--68--1.xml rename to tests/__snapshots__/SvgTest__test_auto_size_for_svg_rendering__1.xml diff --git a/tests/__snapshots__/SvgTest--test_svg_rendering--68--1.xml b/tests/__snapshots__/SvgTest__test_svg_rendering__1.xml similarity index 100% rename from tests/__snapshots__/SvgTest--test_svg_rendering--68--1.xml rename to tests/__snapshots__/SvgTest__test_svg_rendering__1.xml diff --git a/tests/__snapshots__/SvgTest--test_that_custom_svg_takes_over_width_and_height_from_source--68--1.xml b/tests/__snapshots__/SvgTest__test_that_custom_svg_takes_over_width_and_height_from_source__1.xml similarity index 100% rename from tests/__snapshots__/SvgTest--test_that_custom_svg_takes_over_width_and_height_from_source--68--1.xml rename to tests/__snapshots__/SvgTest__test_that_custom_svg_takes_over_width_and_height_from_source__1.xml diff --git a/tests/__snapshots__/SvgTest--test_that_svg_renders_inline_if_set--68--1.xml b/tests/__snapshots__/SvgTest__test_that_svg_renders_inline_if_set__1.xml similarity index 100% rename from tests/__snapshots__/SvgTest--test_that_svg_renders_inline_if_set--68--1.xml rename to tests/__snapshots__/SvgTest__test_that_svg_renders_inline_if_set__1.xml