filter system tags

This commit is contained in:
DavidBadura 2015-04-03 22:23:26 +00:00
parent af20712454
commit 2b67432be4
2 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,11 @@ class Taskwarrior
{ {
$result = $this->command('_tags', $filter); $result = $this->command('_tags', $filter);
return $this->parseResult($result); $tags = $this->parseResult($result);
return array_values(array_filter($tags, function ($value) {
return !in_array($value, ['next', 'nocal', 'nocolor', 'nonag']);
}));
} }
/** /**

View File

@ -497,7 +497,7 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
$task1 = $this->taskManager->find($task1->getUuid()); $task1 = $this->taskManager->find($task1->getUuid());
$this->assertEquals(array('später'), $task1->getTags()); $this->assertEquals(array('später'), $task1->getTags());
$this->assertEquals(array('next', 'nocal', 'nocolor', 'nonag', 'später'), $this->taskwarrior->tags()); $this->assertEquals(array('später'), $this->taskwarrior->tags());
$this->assertCount(1,$this->taskManager->filter('+später')); $this->assertCount(1,$this->taskManager->filter('+später'));
} }