Created
August 6, 2020 08:48
-
-
Save jaggy/0bb7b68d1868948c05e433549eaa5d4c to your computer and use it in GitHub Desktop.
Revisions
-
jaggy created this gist
Aug 6, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ <?php namespace Tests\SetupTraits; trait SetupTraits { protected function setUpTraits() { $this->setupAdditionalTraits( parent::setUpTraits() ); } protected function setupAdditionalTraits($uses) { foreach($uses as $trait) { $method = 'setup' . class_basename($trait); if (! method_exists($this, $method)) { continue; } call_user_func([$this, $method]); } } }