diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-01-16 22:42:37 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2020-01-16 22:42:37 +0300 |
commit | 1361185b9de2ea474cb4c3cec71523c300e8f7eb (patch) | |
tree | 6709bfd6021770a79a88832e147cbeda78c8d679 /tests | |
parent | abd7d9d145e621878d89a87b9d09a93b6119360c (diff) |
Removes some more unneeded code (#15395)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Framework/TestCase/SystemTestCase.php | 10 | ||||
-rw-r--r-- | tests/PHPUnit/Integration/PiwikTest.php | 5 | ||||
-rw-r--r-- | tests/PHPUnit/Unit/FilesystemTest.php | 4 |
3 files changed, 1 insertions, 18 deletions
diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php index 6622c6ea7a..3494cebd68 100644 --- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php +++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php @@ -108,16 +108,6 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase return !empty($travis); } - public static function isPhpVersion53() - { - return strpos(PHP_VERSION, '5.3') === 0; - } - - public static function isPhp7orLater() - { - return version_compare('7.0.0-dev', PHP_VERSION) < 1; - } - public static function isMysqli() { return getenv('MYSQL_ADAPTER') == 'MYSQLI'; diff --git a/tests/PHPUnit/Integration/PiwikTest.php b/tests/PHPUnit/Integration/PiwikTest.php index 4cbf92eeb1..d2cfc13543 100644 --- a/tests/PHPUnit/Integration/PiwikTest.php +++ b/tests/PHPUnit/Integration/PiwikTest.php @@ -33,11 +33,6 @@ class PiwikTest extends IntegrationTestCase '1e3', 0x123, "-1e-2", ); - if (!self::isPhp7orLater()) { - // this seems to be no longer considered valid in PHP 7+ - $value[] = '0x123'; - } - foreach ($valid as $key => $value) { $valid[$key] = array($value); } diff --git a/tests/PHPUnit/Unit/FilesystemTest.php b/tests/PHPUnit/Unit/FilesystemTest.php index bd77e6958d..3ecbbc2c10 100644 --- a/tests/PHPUnit/Unit/FilesystemTest.php +++ b/tests/PHPUnit/Unit/FilesystemTest.php @@ -44,9 +44,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase $input = array('xyz/1.gif', 'x/xyz.gif', 'xxyyzzgg'); $result = Filesystem::sortFilesDescByPathLength($input); - if (SystemTestCase::isPhp7orLater()) { - $input = array('x/xyz.gif', 'xyz/1.gif', 'xxyyzzgg'); - } + $input = array('x/xyz.gif', 'xyz/1.gif', 'xxyyzzgg'); $this->assertEquals($input, $result); } |