Commando\Test\OptionTest::testFileGlob PHP Method

testFileGlob() public method

public testFileGlob ( )
    public function testFileGlob()
    {
        $file = dirname(__FILE__) . '/assets/*.txt';
        $option = new Option(0);
        $option->setFileRequirements(true, true);
        $option->setValue($file);
        $file1 = dirname(__FILE__) . '/assets/example.txt';
        $file2 = dirname(__FILE__) . '/assets/another.txt';
        $values = $option->getValue();
        $this->assertTrue($option->isFile());
        $this->assertCount(2, $values);
        $this->assertTrue(in_array($file1, $values));
        $this->assertTrue(in_array($file2, $values));
    }