Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[tests] Check for Travis

- to ensure appropriate magic.mime is used
  • Loading branch information...
commit d2696509f253cfd536ced58bf2602fa651cb84bb 1 parent ab67b78
Matthew Weier O'Phinney authored May 09, 2012
6  tests/Zend/Validator/File/IsCompressedTest.php
@@ -40,9 +40,15 @@ class IsCompressedTest extends \PHPUnit_Framework_TestCase
40 40
 {
41 41
     protected function getMagicMime()
42 42
     {
  43
+        $travisVersion = getenv('TRAVIS_PHP_VERSION');
  44
+        if ($travisVersion === '5.3') {
  45
+            return __DIR__ . '/_files/magic.lte.5.3.10.mime';
  46
+        }
  47
+
43 48
         if (version_compare(PHP_VERSION, '5.3.10', 'lte')) {
44 49
             return __DIR__ . '/_files/magic.lte.5.3.10.mime';
45 50
         }
  51
+
46 52
         return __DIR__ . '/_files/magic.mime';
47 53
     }
48 54
 
6  tests/Zend/Validator/File/IsImageTest.php
@@ -40,9 +40,15 @@ class IsImageTest extends \PHPUnit_Framework_TestCase
40 40
 {
41 41
     protected function getMagicMime()
42 42
     {
  43
+        $travisVersion = getenv('TRAVIS_PHP_VERSION');
  44
+        if ($travisVersion === '5.3') {
  45
+            return __DIR__ . '/_files/magic.lte.5.3.10.mime';
  46
+        }
  47
+
43 48
         if (version_compare(PHP_VERSION, '5.3.10', 'lte')) {
44 49
             return __DIR__ . '/_files/magic.lte.5.3.10.mime';
45 50
         }
  51
+
46 52
         return __DIR__ . '/_files/magic.mime';
47 53
     }
48 54
 

0 notes on commit d269650

Please sign in to comment.
Something went wrong with that request. Please try again.