public function stack($types = [])
{
if (is_string($types)) {
$types = array_filter(array_map('trim', explode(',', $types)));
}
$files = $this->app['stack']->getList($types);
return $files;
}
public function testStack() { $app = $this->getApp(); $stack = $this->getMockStack(); $stack->expects($this->exactly(3))->method('getList')->withConsecutive([['other', 'document']], [['other', 'document']], [[]]); $app['stack'] = $stack; $handler = new AdminHandler($app); $handler->stack(['other', 'document']); $handler->stack('other, document'); $handler->stack(''); }