/** * @depends testFileName */ public function testListFileOnly() { $files = File::listFileOnly($this->sourceDirPath('testList')); $this->assertCount(3, $files); $keys = array('.dot.txt', 'file1', 'file2'); foreach ($keys as $key) { $filePath = $files[$key]; $this->assertArrayHasKey($key, $files); $this->assertEquals($key, File::getFileName($filePath)); $this->assertFileExists($filePath); $this->assertTrue(is_file($filePath)); } }