Permalink
Browse files

* make all tests correctly skip (vs. fail) in absense of test-config…

….php

 * add description to 012-client-runSet.phpt
  • Loading branch information...
1 parent 702cb4e commit 26ec348fa7f8bd44d4f6305c73f83d63396c7306 @till till committed with Sep 2, 2010
Showing with 19 additions and 5 deletions.
  1. +6 −2 tests/001-echo_req.phpt
  2. +6 −1 tests/010-client-call.phpt
  3. +7 −2 tests/012-client-runSet.phpt
View
@@ -1,9 +1,13 @@
--TEST--
echo_req
+--SKIPIF--
+<?php
+if (!file_exists(dirname(__FILE__) . '/tests-config.php')) {
+ die('skip This test requires a test-config.php file.');
+}
--FILE--
<?php
-
-require_once 'tests-config.php';
+require_once dirname(__FILE__) . '/tests-config.php';
require_once 'Net/Gearman/Connection.php';
$s = Net_Gearman_Connection::connect(array_pop($servers));
@@ -1,9 +1,14 @@
--TEST--
Net_Gearman_Client::__call()
+--SKIPIF--
+<?php
+if (!file_exists(dirname(__FILE__) . '/tests-config.php')) {
+ die('skip This test requires a test-config.php file.');
+}
--FILE--
<?php
-require_once 'tests-config.php';
+require_once dirname(__FILE__) . '/tests-config.php';
require_once 'Net/Gearman/Client.php';
$gearman = new Net_Gearman_Client($servers);
@@ -1,8 +1,13 @@
--TEST--
+Net_Gearman_Set, Net_Gearman_Client::runSet()
+--SKIPIF--
+<?php
+if (!file_exists(dirname(__FILE__) . '/tests-config.php')) {
+ die('skip This test requires a test-config.php file.');
+}
--FILE--
<?php
-
-require_once 'tests-config.php';
+require_once dirname(__FILE__) . '/tests-config.php';
require_once 'Net/Gearman/Client.php';
$sums = array(

0 comments on commit 26ec348

Please sign in to comment.