diff --git a/tests/Console/ModelsCommand/MagicWhere/Test.php b/tests/Console/ModelsCommand/MagicWhere/Test.php index 6e3c4db..c343155 100644 --- a/tests/Console/ModelsCommand/MagicWhere/Test.php +++ b/tests/Console/ModelsCommand/MagicWhere/Test.php @@ -51,100 +51,6 @@ class Test extends AbstractModelsCommand $this->assertSame(0, $tester->getStatusCode()); $this->assertEmpty($tester->getDisplay()); - $expectedContent = <<<'PHP' -assertSame($expectedContent, $actualContent); + $this->assertMatchesPhpSnapshot($actualContent); } } diff --git a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php new file mode 100644 index 0000000..a539a7f --- /dev/null +++ b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php @@ -0,0 +1,90 @@ +assertSame(0, $tester->getStatusCode()); $this->assertEmpty($tester->getDisplay()); - $expectedContent = <<<'PHP' -hasMany(Post::class); - } -} - -PHP; - - $this->assertSame($expectedContent, $actualContent); + $this->assertMatchesPhpSnapshot($actualContent); } } diff --git a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php new file mode 100644 index 0000000..0c8fad9 --- /dev/null +++ b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php @@ -0,0 +1,169 @@ +hasMany(Post::class); + } +}