17 use org\bovigo\vfs\vfsStream;
20 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
41 'first-install-file-present' => [
43 'FIRST_INSTALL2Folder' => [],
44 'FIRST_INSTALL' =>
'',
45 'FIRST_INStall' =>
'',
46 'FIRST_INSTALL.txt' =>
'with content',
47 'somethingelse' =>
'',
48 'dadadaFIRST_INStall' =>
'',
56 'no-first-install-file' => [
58 'FIRST_INSTALL2Folder' => [],
61 'ddd.txt' =>
'with content',
62 'somethingelse' =>
'',
63 'dadadaFIRST_INStall' =>
'',
76 $vfs = vfsStream::setup(
'root');
77 vfsStream::create($structure, $vfs);
79 $subject = $this->getAccessibleMock(EnableFileService::class, [
'dummy'], [],
'',
false);
91 $this->assertEquals([], array_diff($expected, $subject->_call(
'getFirstInstallFilePaths')));
102 'first-install-file-present' => [
104 'FIRST_INSTALL2Folder' => [],
105 'FIRST_INSTALL' =>
'',
106 'FIRST_INStall' =>
'',
107 'FIRST_INSTALL.txt' =>
'with content',
108 'somethingelse' =>
'',
109 'dadadaFIRST_INStall' =>
'',
114 'FIRST_INSTALL2Folder',
116 'dadadaFIRST_INStall',
119 'no-first-install-file' => [
121 'FIRST_INSTALL2Folder' => [],
124 'ddd.txt' =>
'with content',
125 'somethingelse' =>
'',
126 'dadadaFIRST_INStall' =>
'',
131 'FIRST_INSTALL2Folder',
136 'dadadaFIRST_INStall',
148 $vfs = vfsStream::setup(
'root');
149 vfsStream::create($structure, $vfs);
151 $subject = $this->getAccessibleMock(EnableFileService::class, [
'dummy'], [],
'',
false);
163 $subject->_call(
'removeFirstInstallFile');
165 $this->assertEquals([], array_diff($expected, scandir(
'vfs://root/')));