From 0531a58d2466284ecc7ffcb5982eab47f17650d1 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Wed, 24 Jun 2020 15:29:19 +0200 Subject: [PATCH] tests: convert recently created tests to snapshots (#973) They were created slightly before the snapshot PR was merged. --- .../Console/ModelsCommand/MagicWhere/Test.php | 96 +--------- .../__snapshots__/Test__test__1.php | 90 +++++++++ .../RelationCountProperties/Test.php | 175 +----------------- .../__snapshots__/Test__test__1.php | 169 +++++++++++++++++ 4 files changed, 261 insertions(+), 269 deletions(-) create mode 100644 tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php create mode 100644 tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php 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); + } +}