diff --git a/app/helpers.php b/app/helpers.php index 037d901..7b551e3 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,6 +1,5 @@ when(! str($url)->endsWith('.html'), function (Stringable $string) { return $string->append('.html'); }) - ->whenStartsWith(".", function($item) { + ->whenStartsWith('.', function ($item) { /** @var Stringable $item */ return $item->prepend('index'); })->toString(); diff --git a/tests/Feature/Html2TextTest.php b/tests/Feature/Html2TextTest.php index 4f20504..eb85b3e 100644 --- a/tests/Feature/Html2TextTest.php +++ b/tests/Feature/Html2TextTest.php @@ -37,20 +37,19 @@ public function test_parses() public function test_remove_unicode() { - $contentBefore = <<html()->create([ 'content' => $contentBefore, - 'guid' => fake()->uuid . ".html" + 'guid' => fake()->uuid.'.html', ]); $transformerModel = Transformer::factory()->create([ diff --git a/tests/Feature/ScrapeWebPageTest.php b/tests/Feature/ScrapeWebPageTest.php index ddfb8f4..62e9e2e 100644 --- a/tests/Feature/ScrapeWebPageTest.php +++ b/tests/Feature/ScrapeWebPageTest.php @@ -10,7 +10,6 @@ class ScrapeWebPageTest extends TestCase { - public function test_deals_with_index_naming() { $source = Source::factory()->scrapeWebPage()->create( @@ -33,9 +32,10 @@ public function test_deals_with_index_naming() $document = Document::first(); - $this->assertEquals("index.html", $document->guid); + $this->assertEquals('index.html', $document->guid); } + public function test_saves_content() { $source = Source::factory()->scrapeWebPage()->create();