Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Nov 9, 2022
1 parent 648f713 commit 52820cf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Carbon\Carbon;
use Spatie\TemporaryDirectory\TemporaryDirectory;
use function PHPUnit\Framework\assertXmlStringEqualsXmlString;
use Spatie\TemporaryDirectory\TemporaryDirectory;

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/SitemapGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function () {

SitemapGenerator::create('http://localhost:4020')
->shouldCrawl(function (UriInterface $url) {
return !strpos($url->getPath(), 'page3');
return ! strpos($url->getPath(), 'page3');
})
->writeToFile($sitemapPath);

Expand Down
4 changes: 2 additions & 2 deletions tests/SitemapIndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
use Illuminate\Support\Facades\Storage;
use Spatie\Sitemap\SitemapIndex;
use Spatie\Sitemap\Tags\Sitemap;
use function Spatie\Snapshots\assertMatchesXmlSnapshot;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use function Spatie\Snapshots\assertMatchesXmlSnapshot;
use Symfony\Component\HttpFoundation\Response;

beforeEach(function () {
$this->index = new SitemapIndex();
Expand Down
22 changes: 8 additions & 14 deletions tests/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
use Spatie\Sitemap\Contracts\Sitemapable;
use Spatie\Sitemap\Sitemap;
use Spatie\Sitemap\Tags\Url;
use function Spatie\Snapshots\assertMatchesXmlSnapshot;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use function Spatie\Snapshots\assertMatchesXmlSnapshot;
use Symfony\Component\HttpFoundation\Response;

beforeEach(function () {
$this->sitemap = new Sitemap();
Expand Down Expand Up @@ -141,22 +141,19 @@

test('sitemapable object can be added', function () {
$this->sitemap
->add(new class implements Sitemapable
{
->add(new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return '/';
}
})
->add(new class implements Sitemapable
{
->add(new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return Url::create('/home');
}
})
->add(new class implements Sitemapable
{
->add(new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return [
Expand All @@ -171,22 +168,19 @@ public function toSitemapTag(): Url | string | array

test('sitemapable objects can be added', function () {
$this->sitemap->add(collect([
new class implements Sitemapable
{
new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return 'blog/post-1';
}
},
new class implements Sitemapable
{
new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return 'blog/post-2';
}
},
new class implements Sitemapable
{
new class implements Sitemapable {
public function toSitemapTag(): Url | string | array
{
return 'blog/post-3';
Expand Down

0 comments on commit 52820cf

Please sign in to comment.