[BUGFIX] Tests: Remove unstable GeneralUtilityTest::getUrl* 20/27520/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 9 Feb 2014 19:25:17 +0000 (20:25 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 9 Feb 2014 19:27:24 +0000 (20:27 +0100)
Two tests check getUrl() by calling some resource on typo3.org.
This smells funny and the tests are unstable if network, dns
or typo3.org is down or slow. Mocking is not easily possible
with the lowlevel nature of getUrl().
The tests are removed for now.

Change-Id: I85a83345404c833a67c2f532e820fd28bb7c08e7
Resolves: #55821
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/27520
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 2b317d4..13504f1 100644 (file)
@@ -2574,29 +2574,6 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                throw new \RuntimeException('foo', 1344888548);
        }
 
-       ///////////////////////////
-       // Tests concerning getUrl
-       ///////////////////////////
-       /**
-        * @test
-        */
-       public function getUrlWithAdditionalRequestHeadersProvidesHttpHeaderOnError() {
-               $url = 'http://typo3.org/i-do-not-exist-' . time();
-               $report = array();
-               Utility\GeneralUtility::getUrl($url, 0, array(), $report);
-               $this->assertContains('404', $report['message']);
-       }
-
-       /**
-        * @test
-        */
-       public function getUrlProvidesWithoutAdditionalRequestHeadersHttpHeaderOnError() {
-               $url = 'http://typo3.org/i-do-not-exist-' . time();
-               $report = array();
-               Utility\GeneralUtility::getUrl($url, 0, FALSE, $report);
-               $this->assertContains('404', $report['message'], 'Did not provide the HTTP response header when requesting a failing URL.');
-       }
-
        ///////////////////////////////
        // Tests concerning fixPermissions
        ///////////////////////////////