allow getting acls of files

This commit is contained in:
Robin Appelman 2020-02-10 15:52:48 +01:00
commit 3c5e45dc54
12 changed files with 237 additions and 13 deletions

View file

@ -516,7 +516,7 @@ abstract class AbstractShareTest extends TestCase {
}
$this->assertTrue($dirEntry->isDirectory());
$this->assertFalse($dirEntry->isReadOnly());
$this->assertFalse($dirEntry->isReadOnly());
$this->assertFalse($dirEntry->isHidden());
if ($dir[0]->getName() === 'file.txt') {
$fileEntry = $dir[0];
@ -525,7 +525,7 @@ abstract class AbstractShareTest extends TestCase {
}
$this->assertFalse($fileEntry->isDirectory());
$this->assertFalse($fileEntry->isReadOnly());
$this->assertFalse($fileEntry->isReadOnly());
$this->assertFalse($fileEntry->isHidden());
}
/**

View file

@ -23,6 +23,7 @@ class ParserTest extends \PHPUnit_Framework_TestCase {
['RAH', IFileInfo::MODE_READONLY | IFileInfo::MODE_ARCHIVE | IFileInfo::MODE_HIDDEN]
];
}
/**
* @dataProvider modeProvider
*/
@ -108,7 +109,10 @@ class ParserTest extends \PHPUnit_Framework_TestCase {
'c.pdf',
29634,
strtotime('12 Oct 2013 19:05:58 CEST'),
IFileInfo::MODE_NORMAL
IFileInfo::MODE_NORMAL,
function () {
return [];
}
)
]
]
@ -120,6 +124,8 @@ class ParserTest extends \PHPUnit_Framework_TestCase {
*/
public function testDir($output, $dir) {
$parser = new \Icewind\SMB\Wrapped\Parser('CEST');
$this->assertEquals($dir, $parser->parseDir($output, ''));
$this->assertEquals($dir, $parser->parseDir($output, '', function () {
return [];
}));
}
}