Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions tests/DumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -30,7 +31,7 @@ protected function getEnvironmentSetUp($app)
]);
}

/** @test */
#[Test]
public function it_can_dump_all_tables_without_modifications()
{
$this->loadLaravelMigrations();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down