From 106ae230e396826eba210d6bfa66958e594bd579 Mon Sep 17 00:00:00 2001 From: DavidBadura Date: Sat, 1 Aug 2015 21:50:00 +0000 Subject: [PATCH] fix tests --- tests/TaskManagerTest.php | 8 +++++++- tests/TaskwarriorTest.php | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/TaskManagerTest.php b/tests/TaskManagerTest.php index c6e0fed..d67e05c 100644 --- a/tests/TaskManagerTest.php +++ b/tests/TaskManagerTest.php @@ -36,7 +36,13 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase $fs->remove($this->taskDir . '/.taskrc'); $fs->remove($this->taskDir . '/.task'); - $this->taskwarrior = new Taskwarrior($this->taskDir . '/.taskrc', $this->taskDir . '/.task'); + $bin = 'task'; + + if (file_exists(__DIR__ . '/../task')) { + $bin = realpath(__DIR__ . '/../task'); + } + + $this->taskwarrior = new Taskwarrior($this->taskDir . '/.taskrc', $this->taskDir . '/.task', [], $bin); $this->taskManager = new TaskManager($this->taskwarrior); $this->taskwarrior->version(); // to initialise } diff --git a/tests/TaskwarriorTest.php b/tests/TaskwarriorTest.php index 2556d95..520c311 100644 --- a/tests/TaskwarriorTest.php +++ b/tests/TaskwarriorTest.php @@ -18,7 +18,14 @@ class TaskwarriorTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->tearDown(); - $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task'); + + $bin = 'task'; + + if (file_exists(__DIR__ . '/../task')) { + $bin = realpath(__DIR__ . '/../task'); + } + + $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task', [], $bin); $this->taskwarrior->version(); // to initialise }