[BUGFIX] Fix PHP warnings in functional tests 85/27785/3
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 21:50:46 +0000 (22:50 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 21:51:44 +0000 (22:51 +0100)
Some PHP warnings occur in functional tests due
to missing initialization of arrays or unused
function parameters.

Resolves: #56203
Related: #56187
Releases: 6.0
Change-Id: I1cd75de253382759315a8f72cff6e497b31bcc07
Reviewed-on: https://review.typo3.org/27785
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Tests/Functional/Framework/Frontend/RenderElement.php
typo3/sysext/core/Tests/Functional/Page/PageRendererTest.php
typo3/sysext/impexp/Tests/Functional/ImportExport/ExportSimpleTest.php

index fd6c8a5..ec37466 100644 (file)
@@ -49,7 +49,7 @@ class RenderElement {
        /**
         * @var array|RenderLevel[]
         */
-       protected $levels;
+       protected $levels = array();
 
        /**
         * @var array
index 7563ac7..a72bc21 100644 (file)
@@ -350,7 +350,7 @@ class PageRendererTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
        /**
         * @test
         */
-       public function isJqueryLoadedMinifiedFromGoogleByDefault($version, $cdn, $regex) {
+       public function isJqueryLoadedMinifiedFromGoogleByDefault() {
                $subject = new \TYPO3\CMS\Core\Page\PageRenderer();
 
                $expectedRegex = '#<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js" type="text/javascript"></script>#';
index 08f609e..4c4b166 100644 (file)
@@ -40,7 +40,8 @@ class ExportSimpleTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
        public function setUp() {
                parent::setUp();
                $this->setUpBackendUserFromFixture(1);
-
+               // Needed to avoid PHP Warnings
+               $GLOBALS['TBE_STYLES']['spriteIconApi']['iconsAvailable'] = array();
                $this->importDataSet(__DIR__ . '/../Fixtures/Database/pages.xml');
                $this->importDataSet(__DIR__ . '/../Fixtures/Database/tt_content.xml');
        }