From 9bdd2540079f71844973fc3245210996a2f2b9ba Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Jun 2020 18:14:27 +0200 Subject: [PATCH 1/2] tests: adapts to collision beta 2 --- tests/.snapshots/success.txt | 18 +++++++++--------- .../{PhpunitTest.php => ExecutedTest.php} | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) rename tests/PHPUnit/CustomTestCase/{PhpunitTest.php => ExecutedTest.php} (67%) diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index e34ef134..1a8a5130 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -1,5 +1,5 @@ - PASS Tests\CustomTestCase\PhpunitTest + PASS Tests\CustomTestCase\ExecutedTest ✓ that gets executed PASS Tests\Features\AfterAll @@ -24,7 +24,7 @@ ✓ it sets arrays ✓ it gets bound to test case object with ('a') ✓ it gets bound to test case object with ('b') - ✓ it truncates the description with (' fooo fooo fooo fooo fooo fooo fooo f...oo fooo') + ✓ it truncates the description with ('FoooFoooFoooFoooFoooFoooFoooF...ooFooo') ✓ lazy datasets with (1) ✓ lazy datasets with (2) ✓ lazy datasets did the job right @@ -40,10 +40,10 @@ ✓ eager wrapped registered datasets with (1) ✓ eager wrapped registered datasets with (2) ✓ eager registered wrapped datasets did the job right - ✓ lazy named datasets with ( bar object (...)) + ✓ lazy named datasets with (Bar Object (...)) PASS Tests\Features\Exceptions - ✓ it gives access the the underlying expect exception + ✓ it gives access the the underlying expectException ✓ it catch exceptions ✓ it catch exceptions and messages @@ -64,8 +64,8 @@ ✓ it has bar PASS Tests\Features\PendingHigherOrderTests - ✓ get 'foo' → get 'bar' → assert true true - ✓ get 'foo' → assert true true + ✓ get 'foo' → get 'bar' → assertTrue true + ✓ get 'foo' → assertTrue true WARN Tests\Features\Skip ✓ it do not skips @@ -87,10 +87,10 @@ ✓ it example PASS Tests\PHPUnit\CustomTestCase\UsesPerDirectory - ✓ closure was bound to custom test case + ✓ closure was bound to CustomTestCase PASS Tests\PHPUnit\CustomTestCaseInSubFolders\SubFolder\SubFolder\UsesPerSubDirectory - ✓ closure was bound to custom test case + ✓ closure was bound to CustomTestCase PASS Tests\PHPUnit\CustomTestCaseInSubFolders\SubFolder2\UsesPerFile ✓ custom traits can be used @@ -135,4 +135,4 @@ s visual snapshot of test suite on success Tests: 6 skipped, 71 passed - Time: 2.89s + Time: 2.96s diff --git a/tests/PHPUnit/CustomTestCase/PhpunitTest.php b/tests/PHPUnit/CustomTestCase/ExecutedTest.php similarity index 67% rename from tests/PHPUnit/CustomTestCase/PhpunitTest.php rename to tests/PHPUnit/CustomTestCase/ExecutedTest.php index 233da16d..71a32980 100644 --- a/tests/PHPUnit/CustomTestCase/PhpunitTest.php +++ b/tests/PHPUnit/CustomTestCase/ExecutedTest.php @@ -7,7 +7,7 @@ namespace Tests\CustomTestCase; use function PHPUnit\Framework\assertTrue; use PHPUnit\Framework\TestCase; -class PhpunitTest extends TestCase +class ExecutedTest extends TestCase { public static $executed = false; @@ -16,8 +16,8 @@ class PhpunitTest extends TestCase { self::$executed = true; - $this->assertTrue(true); + assertTrue(true); } } -// register_shutdown_function(fn () => assertTrue(PhpunitTest::$executed)); +// register_shutdown_function(fn () => assertTrue(ExecutedTest::$executed)); From f5f717f1ad46db6791a2e213cda53b0d4d9dad6a Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Fri, 5 Jun 2020 18:18:06 +0200 Subject: [PATCH 2/2] chore: requires more than collision beta1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f832fda5..44aaf9ad 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require": { "php": "^7.3", - "nunomaduro/collision": "^5.0", + "nunomaduro/collision": "^5.0.0-BETA2", "pestphp/pest-plugin": "dev-master", "pestphp/pest-plugin-coverage": "dev-master", "phpunit/phpunit": "^9.1.4",