diff --git a/src/Taskwarrior.php b/src/Taskwarrior.php index 7f37c69..8b8d4d4 100644 --- a/src/Taskwarrior.php +++ b/src/Taskwarrior.php @@ -182,7 +182,7 @@ class Taskwarrior return $this->version; } - return $this->version = $this->command('_version'); + return $this->version = trim($this->command('_version')); } /** diff --git a/tests/TaskManagerTest.php b/tests/TaskManagerTest.php index d3272b6..68856a7 100644 --- a/tests/TaskManagerTest.php +++ b/tests/TaskManagerTest.php @@ -179,7 +179,7 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase public function testModified() { - if (version_compare($this->taskwarrior->version(), '2.2.0', '>=')) { + if (version_compare($this->taskwarrior->version(), '2.2.0') < 0) { $this->markTestSkipped(sprintf( 'taskwarrior version %s dont support modified attr', $this->taskwarrior->version()