[BUGFIX] Warning in FAL StorageTest
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 20:35:25 +0000 (22:35 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 20:40:03 +0000 (22:40 +0200)
checkFolderPermissionsRespectsFilesystemPermissions throws a warning
that the third argument from the data provider is missing with its first
data set. The third argument is not always needed and set to a sane
default now.

Change-Id: I25d6c21addcefc5bec6d8f3a8adc48bfc0f38481
Resolves: #40766
Releases: 6.0
Reviewed-on: http://review.typo3.org/14465
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
tests/Unit/t3lib/file/StorageTest.php

index e2d556d..c573f90 100644 (file)
@@ -237,11 +237,16 @@ class t3lib_file_StorageTest extends t3lib_file_BaseTestCase {
                $this->fixture->addFile($this->getUrlInMount('file.ext'), $mockedFolder);
        }
 
                $this->fixture->addFile($this->getUrlInMount('file.ext'), $mockedFolder);
        }
 
-       public function checkFolderPermissionsFilesystemPermissions_dataProvider() {
+       /**
+        * Data provider for checkFolderPermissionsRespectsFilesystemPermissions
+        *
+        * @return array
+        */
+       public function checkFolderPermissionsFilesystemPermissionsDataProvider() {
                return array(
                        'read action on readable/writable folder' => array(
                                'read',
                return array(
                        'read action on readable/writable folder' => array(
                                'read',
-                               array('r' => TRUE, 'w' => TRUE)
+                               array('r' => TRUE, 'w' => TRUE),
                        ),
                        'read action on unreadable folder' => array(
                                'read',
                        ),
                        'read action on unreadable folder' => array(
                                'read',
@@ -258,12 +263,12 @@ class t3lib_file_StorageTest extends t3lib_file_BaseTestCase {
 
        /**
         * @test
 
        /**
         * @test
-        * @dataProvider checkFolderPermissionsFilesystemPermissions_dataProvider
+        * @dataProvider checkFolderPermissionsFilesystemPermissionsDataProvider
         * @param string $action 'read' or 'write'
         * @param array $permissionsFromDriver The permissions as returned from the driver
         * @param bool $expectedException
         */
         * @param string $action 'read' or 'write'
         * @param array $permissionsFromDriver The permissions as returned from the driver
         * @param bool $expectedException
         */
-       public function checkFolderPermissionsRespectsFilesystemPermissions($action, $permissionsFromDriver, $expectedException) {
+       public function checkFolderPermissionsRespectsFilesystemPermissions($action, $permissionsFromDriver, $expectedException = '') {
                $mockedDriver = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Driver\\LocalDriver');
                $mockedDriver->expects($this->any())->method('getFolderPermissions')->will($this->returnValue($permissionsFromDriver));
                $mockedFolder = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Folder', array(), array(), '', FALSE);
                $mockedDriver = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Driver\\LocalDriver');
                $mockedDriver->expects($this->any())->method('getFolderPermissions')->will($this->returnValue($permissionsFromDriver));
                $mockedFolder = $this->getMock('TYPO3\\CMS\\Core\\Resource\\Folder', array(), array(), '', FALSE);