From 1f172b76662ba556772bbcf2ca1464721f3e15bb Mon Sep 17 00:00:00 2001 From: Amir Date: Wed, 1 Sep 2021 21:17:19 +0430 Subject: [PATCH] bug fix in src/Engineer/Tests/Test.php --- src/Engineer/Tests/Test.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Engineer/Tests/Test.php b/src/Engineer/Tests/Test.php index a738e69..54f6815 100644 --- a/src/Engineer/Tests/Test.php +++ b/src/Engineer/Tests/Test.php @@ -4,8 +4,17 @@ class Test { - public function run() + public function run(array $arguments): void { - echo shell_exec('./vendor/bin/phpunit --color=always'); + unset($arguments[0]); + unset($arguments[1]); + if (!empty($arguments)){ + $arguments = implode(' ' , $arguments); + $exec = "./vendor/bin/phpunit $arguments --color=always"; + }else{ + $exec = "./vendor/bin/phpunit --color=always"; + } + + echo shell_exec($exec); } } \ No newline at end of file