From 681651b397515626c8aba51ca54d7132c8984eeb Mon Sep 17 00:00:00 2001 From: Bill Mitchell Date: Fri, 23 Jun 2017 16:39:26 -0700 Subject: [PATCH] Command test --- src/Commands/ChurnCommand.php | 2 +- tests/Unit/Services/CommandServiceTest.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/Unit/Services/CommandServiceTest.php diff --git a/src/Commands/ChurnCommand.php b/src/Commands/ChurnCommand.php index aa185fa7..32b4e2b0 100644 --- a/src/Commands/ChurnCommand.php +++ b/src/Commands/ChurnCommand.php @@ -22,7 +22,7 @@ class ChurnCommand extends Command public function __construct() { parent::__construct(); - $commitCountAssessor = new GitCommitCountAssessor(new CommandService); + $commitCountAssessor = new GitCommitCountAssessor(new CommandService); $complexityAssessor = new CyclomaticComplexityAssessor(); $this->resultsGenerator = new ResultsGenerator($commitCountAssessor, $complexityAssessor); $this->fileManager = new FileManager; diff --git a/tests/Unit/Services/CommandServiceTest.php b/tests/Unit/Services/CommandServiceTest.php new file mode 100644 index 00000000..2b024e6a --- /dev/null +++ b/tests/Unit/Services/CommandServiceTest.php @@ -0,0 +1,17 @@ +execute("echo hi"); + $this->assertSame(["hi"], $result); + } +} \ No newline at end of file