From accd4eb7b4ee38d6dfba48e03f41c976dc6274aa Mon Sep 17 00:00:00 2001 From: Francisco Kraefft Date: Wed, 17 Jun 2020 11:57:08 -0300 Subject: [PATCH] Multiple global uses registered in the same path test added. --- tests/.snapshots/success.txt | 5 +++-- tests/Autoload.php | 9 +++++++++ tests/Plugins/Traits.php | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 8e3f32e0..961a0180 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -101,6 +101,7 @@ PASS Tests\Plugins\Traits ✓ it allows global uses + ✓ it allows multiple global uses registered in the same path PASS Tests\Unit\Actions\AddsDefaults ✓ it sets defaults @@ -143,5 +144,5 @@ WARN Tests\Visual\Success s visual snapshot of test suite on success - Tests: 6 skipped, 78 passed - Time: 3.09s + Tests: 6 skipped, 79 passed + Time: 3.44s diff --git a/tests/Autoload.php b/tests/Autoload.php index 1945c643..9283dbad 100644 --- a/tests/Autoload.php +++ b/tests/Autoload.php @@ -12,4 +12,13 @@ trait PluginTrait } } +trait SecondPluginTrait +{ + public function assertSecondPluginTraitGotRegistered(): void + { + assertTrue(true); + } +} + Pest\Plugin::uses(PluginTrait::class); +Pest\Plugin::uses(SecondPluginTrait::class); diff --git a/tests/Plugins/Traits.php b/tests/Plugins/Traits.php index bd318c28..47573baa 100644 --- a/tests/Plugins/Traits.php +++ b/tests/Plugins/Traits.php @@ -1,3 +1,5 @@ assertPluginTraitGotRegistered(); + +it('allows multiple global uses registered in the same path')->assertSecondPluginTraitGotRegistered();