From 71a95c42ac1f9b27e011ced5875f1afac6fec18e Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 3 Jul 2024 20:14:31 +0200 Subject: [PATCH] Remove unnecessary test code comments --- .../Feature/PostsAuthorIntegrationTest.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/framework/tests/Feature/PostsAuthorIntegrationTest.php b/packages/framework/tests/Feature/PostsAuthorIntegrationTest.php index 188d557297d..a520012719b 100644 --- a/packages/framework/tests/Feature/PostsAuthorIntegrationTest.php +++ b/packages/framework/tests/Feature/PostsAuthorIntegrationTest.php @@ -32,7 +32,6 @@ protected function setUp(): void */ public function testCreatePostWithUndefinedAuthor() { - // Create a new post (new CreatesNewMarkdownPostFile( title: 'post-with-undefined-author', description: '', @@ -40,13 +39,8 @@ public function testCreatePostWithUndefinedAuthor() author: 'test_undefined_author' ))->save(); - // Check that the post was created $this->assertFileExists(Hyde::path('_posts/post-with-undefined-author.md')); - - // Build the static page $this->artisan('rebuild _posts/post-with-undefined-author.md')->assertExitCode(0); - - // Check that the file was created $this->assertFileExists(Hyde::path('_site/posts/post-with-undefined-author.html')); // Check that the author is rendered as is in the DOM @@ -55,7 +49,6 @@ public function testCreatePostWithUndefinedAuthor() file_get_contents(Hyde::path('_site/posts/post-with-undefined-author.html')) ); - // Remove the test files Filesystem::unlink('_posts/post-with-undefined-author.md'); Filesystem::unlink('_site/posts/post-with-undefined-author.html'); } @@ -65,7 +58,6 @@ public function testCreatePostWithUndefinedAuthor() */ public function testCreatePostWithDefinedAuthorWithName() { - // Create a new post (new CreatesNewMarkdownPostFile( title: 'post-with-defined-author-with-name', description: '', @@ -73,18 +65,14 @@ public function testCreatePostWithDefinedAuthorWithName() author: 'named_author' ))->save(); - // Check that the post was created $this->assertFileExists(Hyde::path('_posts/post-with-defined-author-with-name.md')); Config::set('hyde.authors', [ Author::create('named_author', 'Test Author', null), ]); - // Check that the post was created $this->assertFileExists(Hyde::path('_posts/post-with-defined-author-with-name.md')); - // Build the static page $this->artisan('rebuild _posts/post-with-defined-author-with-name.md')->assertExitCode(0); - // Check that the file was created $this->assertFileExists(Hyde::path('_site/posts/post-with-defined-author-with-name.html')); // Check that the author is contains the set name in the DOM @@ -93,7 +81,6 @@ public function testCreatePostWithDefinedAuthorWithName() file_get_contents(Hyde::path('_site/posts/post-with-defined-author-with-name.html')) ); - // Remove the test files Filesystem::unlink('_posts/post-with-defined-author-with-name.md'); Filesystem::unlink('_site/posts/post-with-defined-author-with-name.html'); } @@ -103,7 +90,6 @@ public function testCreatePostWithDefinedAuthorWithName() */ public function testCreatePostWithDefinedAuthorWithWebsite() { - // Create a new post (new CreatesNewMarkdownPostFile( title: 'post-with-defined-author-with-name', description: '', @@ -111,18 +97,14 @@ public function testCreatePostWithDefinedAuthorWithWebsite() author: 'test_author_with_website' ))->save(); - // Check that the post was created $this->assertFileExists(Hyde::path('_posts/post-with-defined-author-with-name.md')); Config::set('hyde.authors', [ Author::create('test_author_with_website', 'Test Author', 'https://example.org'), ]); - // Check that the post was created $this->assertFileExists(Hyde::path('_posts/post-with-defined-author-with-name.md')); - // Build the static page $this->artisan('rebuild _posts/post-with-defined-author-with-name.md')->assertExitCode(0); - // Check that the file was created $this->assertFileExists(Hyde::path('_site/posts/post-with-defined-author-with-name.html')); // Check that the author is contains the set name in the DOM @@ -137,7 +119,6 @@ public function testCreatePostWithDefinedAuthorWithWebsite() file_get_contents(Hyde::path('_site/posts/post-with-defined-author-with-name.html')) ); - // Remove the test files Filesystem::unlink('_posts/post-with-defined-author-with-name.md'); Filesystem::unlink('_site/posts/post-with-defined-author-with-name.html'); }