浏览代码

[tests] skip parsing traits if php version is less than 5.4

gedi 13 年之前
父节点
当前提交
a30df5909b
共有 2 个文件被更改,包括 15 次插入11 次删除
  1. 4 0
      tests/Gedmo/Timestampable/TraitUsageTest.php
  2. 11 11
      tests/phpunit.xml.dist

+ 4 - 0
tests/Gedmo/Timestampable/TraitUsageTest.php

@@ -22,6 +22,10 @@ class TraitUsageTest extends BaseTestCaseORM
     {
         parent::setUp();
 
+        if (version_compare(PHP_VERSION, '5.4.0') < 0) {
+            $this->markTestSkipped('PHP >= 5.4 version required for this test.');
+        }
+
         $evm = new EventManager;
         $evm->addEventSubscriber(new TimestampableListener);
 

+ 11 - 11
tests/phpunit.xml.dist

@@ -12,37 +12,37 @@
 >
     <testsuites>
         <testsuite name="Translatable Extension">
-            <directory suffix=".php">./Gedmo/Translatable/</directory>
+            <directory suffix="Test.php">./Gedmo/Translatable/</directory>
         </testsuite>
         <testsuite name="Sluggable Extension">
-            <directory suffix=".php">./Gedmo/Sluggable/</directory>
+            <directory suffix="Test.php">./Gedmo/Sluggable/</directory>
         </testsuite>
         <testsuite name="Sortable Extension">
-            <directory suffix=".php">./Gedmo/Sortable/</directory>
+            <directory suffix="Test.php">./Gedmo/Sortable/</directory>
         </testsuite>
         <testsuite name="Tree Extension">
-            <directory suffix=".php">./Gedmo/Tree/</directory>
+            <directory suffix="Test.php">./Gedmo/Tree/</directory>
         </testsuite>
         <testsuite name="Timestampable Extension">
-            <directory suffix=".php">./Gedmo/Timestampable/</directory>
+            <directory suffix="Test.php">./Gedmo/Timestampable/</directory>
         </testsuite>
         <testsuite name="Mapping Extension">
-            <directory suffix=".php">./Gedmo/Mapping/</directory>
+            <directory suffix="Test.php">./Gedmo/Mapping/</directory>
         </testsuite>
         <testsuite name="Loggable Extension">
-            <directory suffix=".php">./Gedmo/Loggable/</directory>
+            <directory suffix="Test.php">./Gedmo/Loggable/</directory>
         </testsuite>
         <testsuite name="Sortable Extension">
-            <directory suffix=".php">./Gedmo/Sortable/</directory>
+            <directory suffix="Test.php">./Gedmo/Sortable/</directory>
         </testsuite>
         <testsuite name="Object wrappers">
-            <directory suffix=".php">./Gedmo/Wrapper/</directory>
+            <directory suffix="Test.php">./Gedmo/Wrapper/</directory>
         </testsuite>
         <testsuite name="Translator extension">
-            <directory suffix=".php">./Gedmo/Translator/</directory>
+            <directory suffix="Test.php">./Gedmo/Translator/</directory>
         </testsuite>
         <testsuite name="SoftDeleteable Extension">
-            <directory suffix=".php">./Gedmo/SoftDeleteable/</directory>
+            <directory suffix="Test.php">./Gedmo/SoftDeleteable/</directory>
         </testsuite>
     </testsuites>
 </phpunit>