Bolt\Tests\Stack\StackTest::testList PHP Method

testList() public method

public testList ( )
    public function testList()
    {
        $files = $this->stack->getList();
        $this->assertCount(7, $files);
        $this->assertTrue($files[0] instanceof FileInterface, 'Should be a list of file objects');
        $this->assertFiles($files, ['files://a.jpg', 'files://b.txt', 'files://c.txt', 'files://d.doc', 'files://e.mp3', 'theme://f.txt', 'theme://g.txt']);
        $this->assertFiles($this->stack->getList(['image']), ['files://a.jpg'], 'List should only contain image files');
        $this->assertFiles($this->stack->getList(['document']), ['files://b.txt', 'files://c.txt', 'files://d.doc', 'theme://f.txt', 'theme://g.txt'], 'List should only contain document files');
        $this->assertFiles($this->stack->getList(['other']), ['files://e.mp3'], 'List should only contain non image and document files');
        $this->assertFiles($this->stack->getList(['image', 'document']), ['files://a.jpg', 'files://b.txt', 'files://c.txt', 'files://d.doc', 'theme://f.txt', 'theme://g.txt'], 'List should contain only image and document files');
    }