filter system tags
This commit is contained in:
parent
af20712454
commit
2b67432be4
|
@ -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']);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue