Просмотр исходного кода

Test suite: move the test suite safeguard flag to PredisShared.php.

Daniele Alessandri 14 лет назад
Родитель
Сommit
627c3a1724
3 измененных файлов с 11 добавлено и 6 удалено
  1. 0 2
      test/PredisClientFeatures.php
  2. 11 2
      test/PredisShared.php
  3. 0 2
      test/RedisCommandsTest.php

+ 0 - 2
test/PredisClientFeatures.php

@@ -1,6 +1,4 @@
 <?php
-define('I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE', false);
-
 require_once 'PHPUnit/Framework.php';
 require_once 'PredisShared.php';
 require_once '../lib/Predis_Compatibility.php';

+ 11 - 2
test/PredisShared.php

@@ -1,10 +1,19 @@
 <?php
-require_once '../lib/Predis.php';
+// -------------------------------------------------------------------------- //
+
+define('I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE', false);
+
+// -------------------------------------------------------------------------- //
 
 if (I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE !== true) {
-    exit('Please set the I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE constant to TRUE if you want to proceed.');
+    exit(
+        "Please set the I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE " .
+        "constant to TRUE in PredisShared.php if you want to proceed.\n"
+    );
 }
 
+require_once '../lib/Predis.php';
+
 if (!function_exists('array_union')) {
     function array_union(Array $a, Array $b) { 
         return array_merge($a, array_diff($b, $a));

+ 0 - 2
test/RedisCommandsTest.php

@@ -1,6 +1,4 @@
 <?php
-define('I_AM_AWARE_OF_THE_DESTRUCTIVE_POWER_OF_THIS_TEST_SUITE', false);
-
 require_once 'PHPUnit/Framework.php';
 require_once 'PredisShared.php';