fix filter & escaping

This commit is contained in:
DavidBadura
2015-04-23 16:49:41 +00:00
parent 682561a58e
commit d392b5871e
2 changed files with 45 additions and 10 deletions

View File

@@ -69,6 +69,32 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($task, $result);
}
public function testUrlInDescription()
{
$task = new Task();
$task->setDescription('hier http://google.de ');
$this->taskManager->save($task);
$this->taskManager->clear();
$result = $this->taskManager->find($task->getUuid());
$this->assertEquals('hier http://google.de ', $result->getDescription());
}
public function testQuoteInDescription()
{
$task = new Task();
$task->setDescription(" test ' foo ");
$this->taskManager->save($task);
$this->taskManager->clear();
$result = $this->taskManager->find($task->getUuid());
$this->assertEquals(" test ' foo ", $result->getDescription());
}
public function testSaveTaskWithoutDescription()
{
$this->setExpectedException('DavidBadura\Taskwarrior\Exception\TaskwarriorException');