From 4895f3cb911ba9a7dcc21c60bb13367063b20c11 Mon Sep 17 00:00:00 2001 From: Bram Wubs Date: Mon, 20 Apr 2026 13:48:46 +0200 Subject: [PATCH] Use the new `#[Test]` Attribute --- tests/DumperTest.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/DumperTest.php b/tests/DumperTest.php index 558360a..c734119 100644 --- a/tests/DumperTest.php +++ b/tests/DumperTest.php @@ -2,6 +2,7 @@ namespace BeyondCode\LaravelMaskedDumper\Tests; +use PHPUnit\Framework\Attributes\Test; use BeyondCode\LaravelMaskedDumper\DumpSchema; use BeyondCode\LaravelMaskedDumper\LaravelMaskedDumpServiceProvider; use BeyondCode\LaravelMaskedDumper\TableDefinitions\TableDefinition; @@ -30,7 +31,7 @@ protected function getEnvironmentSetUp($app) ]); } - /** @test */ + #[Test] public function it_can_dump_all_tables_without_modifications() { $this->loadLaravelMigrations(); @@ -55,7 +56,7 @@ public function it_can_dump_all_tables_without_modifications() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_mask_user_names() { $this->loadLaravelMigrations(); @@ -84,7 +85,7 @@ public function it_can_mask_user_names() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_replace_columns_with_static_values() { $this->loadLaravelMigrations(); @@ -113,7 +114,7 @@ public function it_can_replace_columns_with_static_values() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_replace_columns_with_faker_values() { $this->loadLaravelMigrations(); @@ -143,7 +144,7 @@ public function it_can_replace_columns_with_faker_values() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_dump_certain_tables_as_schema_only() { $this->loadLaravelMigrations(); @@ -169,7 +170,7 @@ public function it_can_dump_certain_tables_as_schema_only() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_does_remove_excluded_tables_from_allTables() { $this->loadLaravelMigrations(); @@ -196,7 +197,7 @@ public function it_does_remove_excluded_tables_from_allTables() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_does_remove_excluded_array_of_tables_from_allTables() { $this->loadLaravelMigrations(); @@ -222,7 +223,8 @@ public function it_does_remove_excluded_array_of_tables_from_allTables() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + + #[Test] public function it_creates_chunked_insert_statements_for_a_table() { $this->loadLaravelMigrations(); @@ -263,7 +265,7 @@ public function it_creates_chunked_insert_statements_for_a_table() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_include_individual_unmodified_tables() { $this->loadLaravelMigrations(); @@ -289,7 +291,7 @@ public function it_can_include_individual_unmodified_tables() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_can_include_an_array_of_unmodified_tables() { $this->loadLaravelMigrations(); @@ -315,7 +317,7 @@ public function it_can_include_an_array_of_unmodified_tables() $this->assertMatchesTextSnapshot(file_get_contents($outputFile)); } - /** @test */ + #[Test] public function it_still_includes_tables_with_repeated_use_of_include() { $this->loadLaravelMigrations();