[evolvis-commits] r14742: Adding tests to check the environment is setup the right way?==?UTF-8?Q?↵

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 04:48:59 CET 2011


Author: mirabilos
Date: 2011-02-28 04:48:59 +0100 (Mon, 28 Feb 2011)
New Revision: 14742

Modified:
   trunk/gforge_base/evolvisforge-5.1/tests/code/syntax/SyntaxTest.php
Log:
Adding tests to check the environment is setup the right way


Modified: trunk/gforge_base/evolvisforge-5.1/tests/code/syntax/SyntaxTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/tests/code/syntax/SyntaxTest.php	2011-02-28 03:48:56 UTC (rev 14741)
+++ trunk/gforge_base/evolvisforge-5.1/tests/code/syntax/SyntaxTest.php	2011-02-28 03:48:59 UTC (rev 14742)
@@ -12,6 +12,31 @@
  */
 class Syntax_Tests extends PHPUnit_Framework_TestCase
 {
+  /**
+   * First, make sure pcregrep is installed
+   */
+  public function testPcRegrepInstalled()
+  {
+    $output = `type pcregrep >/dev/null; echo $?`;
+    $rc = trim($output);
+    if ($rc != '0') {
+      $output = `type pcregrep`;
+      $this->fail('You should probably install "pcregrep" : `type pcregrep` reports "'.$output);
+    }
+  }
+
+  /**
+   * First, make sure it is run from inside the tests/ subdir
+   */
+  public function testPath()
+  {
+    $output = `ls ../gforge >/dev/null; echo $?`;
+    $rc = trim($output);
+    if ($rc != '0') {
+      $output = `ls ../gforge`;
+      $this->fail('Must be run from inside the "tests/" subdir : `ls ../gforge` reports "'.$output);
+    }
+  }
     /**
      * Validate all php code with php -l.
      */



More information about the evolvis-commits mailing list