Skip to content

Commit 9692ad9

Browse files
committed
Converted array tests to new format
1 parent 6cbbcfe commit 9692ad9

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

tests/array-tests.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
require_once 'PHPUnit.php';
32

3+
require_once(dirname($_SERVER['PHP_SELF'])."/test.php");
44
echo "Redis Array tests.\n\n";
55

66
function custom_hash($str) {
@@ -12,7 +12,7 @@ function custom_hash($str) {
1212
return $str;
1313
}
1414

15-
class Redis_Array_Test extends PHPUnit_TestCase
15+
class Redis_Array_Test extends TestSuite
1616
{
1717
private $strings;
1818
public $ra = NULL;
@@ -95,7 +95,7 @@ public function testKeyLocality() {
9595

9696
}
9797

98-
class Redis_Rehashing_Test extends PHPUnit_TestCase
98+
class Redis_Rehashing_Test extends TestSuite
9999
{
100100

101101
public $ra = NULL;
@@ -266,7 +266,7 @@ public function testReadRedistributedKeys() {
266266
}
267267

268268
// Test auto-migration of keys
269-
class Redis_Auto_Rehashing_Test extends PHPUnit_TestCase {
269+
class Redis_Auto_Rehashing_Test extends TestSuite {
270270

271271
public $ra = NULL;
272272

@@ -336,7 +336,7 @@ public function testAllKeysHaveBeenMigrated() {
336336
}
337337

338338
// Test node-specific multi/exec
339-
class Redis_Multi_Exec_Test extends PHPUnit_TestCase {
339+
class Redis_Multi_Exec_Test extends TestSuite {
340340

341341
public $ra = NULL;
342342

@@ -437,9 +437,7 @@ function run_tests($className) {
437437
$serverList = array('localhost:6379', 'localhost:6380', 'localhost:6381', 'localhost:6382');
438438

439439
// run
440-
$suite = new PHPUnit_TestSuite($className);
441-
$result = PHPUnit::run($suite);
442-
echo $result->toString();
440+
TestSuite::run($className);
443441
}
444442

445443
define('REDIS_ARRAY_DATA_SIZE', 1000);

tests/test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public static function run($className) {
5151

5252
if(empty($className::$errors)) {
5353
echo "All tests passed.\n";
54-
exit(0);
5554
}
5655

5756
echo implode('', $className::$errors);

0 commit comments

Comments
 (0)