public function FileValidatorTest::testFilesToTree in Mini site 8
Test filesToTree() method.
@dataProvider dataProviderFilesToTree @covers \Drupal\minisite\FileValidator::filesToTree
File
- tests/
src/ Unit/ FileValidatorTest.php, line 86
Class
- FileValidatorTest
- Class FileValidatorTest.
Namespace
Drupal\Tests\minisite\UnitCode
public function testFilesToTree($files, $expected, $expectException = FALSE) {
if ($expectException) {
$this
->expectException(\RuntimeException::class);
$this
->expectExceptionMessage('Invalid file list provided');
}
$actual = FileValidator::filesToTree($files);
$this
->assertEquals($expected, $actual);
}