fix #26 validate path

This commit is contained in:
DavidBadura
2015-07-07 21:27:06 +00:00
parent 1fa3824ea5
commit 855cfad124
3 changed files with 60 additions and 7 deletions

View File

@@ -37,4 +37,18 @@ class TaskwarriorTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($config->has('urgency.age.max'));
$this->assertEquals('365', $config->get('urgency.age.max'));
}
public function testTaskrcNotFound()
{
$this->setExpectedException('DavidBadura\Taskwarrior\Exception\TaskwarriorException');
new Taskwarrior('/not/found/.taskrc', __DIR__ . '/.task');
}
public function testTaskDataNotFound()
{
$this->setExpectedException('DavidBadura\Taskwarrior\Exception\TaskwarriorException');
new Taskwarrior(__DIR__ . '/.taskrc', '/not/found/.task');
}
}