ソースを参照

[tests] Use a custom phpunit.xml file for TravisCI.

TravisCI environmenti run Redis 2.2 but we need Redis 2.4 to run the
integration tests in the test suite. For now we have simply disabled
the `connected` group of tests using a custom phpunit.xml file, we will
see later if it is worth building Redis on the fly with a `before_script`
directive in .travis.yml or just wait for a a new version of Redis to
be deployed on their VM images.
Daniele Alessandri 13 年 前
コミット
6730661b4a
2 ファイル変更40 行追加0 行削除
  1. 1 0
      .travis.yml
  2. 39 0
      phpunit.xml.travisci

+ 1 - 0
.travis.yml

@@ -6,3 +6,4 @@ branches:
   only:
     - master
     - v0.7
+script: phpunit -c phpunit.xml.travisci

+ 39 - 0
phpunit.xml.travisci

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit bootstrap="tests/bootstrap.php" colors="true" strict="true">
+    <testsuites>
+        <testsuite name="Predis Test Suite">
+            <directory>tests/Predis/</directory>
+        </testsuite>
+    </testsuites>
+
+    <groups>
+        <exclude>
+            <group>ext-phpiredis</group>
+            <group>ext-curl</group>
+            <group>realm-webdis</group>
+            <group>connected</group>
+            <!-- <group>disconnected</group> -->
+            <!-- <group>commands</group> -->
+            <!-- <group>slow</group> -->
+        </exclude>
+    </groups>
+
+    <filter>
+        <whitelist>
+            <directory suffix=".php">lib/Predis/</directory>
+        </whitelist>
+    </filter>
+
+    <php>
+        <!-- Redis -->
+        <const name="REDIS_SERVER_VERSION" value="2.4" />
+        <const name="REDIS_SERVER_HOST" value="127.0.0.1" />
+        <const name="REDIS_SERVER_PORT" value="6379" />
+        <const name="REDIS_SERVER_DBNUM" value="15" />
+
+        <!-- Webdis -->
+        <const name="WEBDIS_SERVER_HOST" value="127.0.0.1" />
+        <const name="WEBDIS_SERVER_PORT" value="7379" />
+    </php>
+</phpunit>