[BUGFIX] Tests: Remove unstable GeneralUtilityTest::getUrl* 18/27518/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 9 Feb 2014 18:48:24 +0000 (19:48 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 9 Feb 2014 19:22:00 +0000 (20:22 +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/27518
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 78f3014..e6d4759 100644 (file)
@@ -2641,36 +2641,6 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                throw new \RuntimeException('foo', 1344888548);
        }
 
-       ///////////////////////////
-       // Tests concerning getUrl
-       ///////////////////////////
-
-       /**
-        * @test
-        */
-       public function getUrlWithAdditionalRequestHeadersProvidesHttpHeaderOnError() {
-               if (!$this->isConnected()) {
-                       $this->markTestSkipped('No internet connection detected');
-               }
-               $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() {
-               if (!$this->isConnected()) {
-                       $this->markTestSkipped('No internet connection detected');
-               }
-               $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
        ///////////////////////////////