Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 53 lines (43 sloc) 1.32 kb
f6ca28b - offsetGet() now returns null when offset doesn't exist
Denny Shimkoski authored
1 <?php
2
3 /**
4 * Unit tests for Text_PathNavigator
5 *
6 * PHP version 5
7 *
8 * @category Text
9 * @package PathNavigator
10 * @author Denny Shimkoski <bytebrite@gmail.com>
11 * @license http://www.opensource.org/licenses/mit-license.html MIT
12 * @version SVN: $Id$
13 * @link http://pear.php.net/package/Text_PathNavigator
14 */
15
16 if (!defined('PHPUnit_MAIN_METHOD')) {
17 define('PHPUnit_MAIN_METHOD', 'Text_PathNavigator_AllTests::main');
18 }
19
79db783 Get unit tests working.
Daniel Convissor authored
20 if ($fp = @fopen('PHPUnit/Autoload.php', 'r', true)) {
21 require_once 'PHPUnit/Autoload.php';
22 } elseif ($fp = @fopen('PHPUnit/Framework.php', 'r', true)) {
23 require_once 'PHPUnit/Framework.php';
24 require_once 'PHPUnit/TextUI/TestRunner.php';
25 } else {
26 die('skip could not find PHPUnit');
27 }
28 fclose($fp);
f6ca28b - offsetGet() now returns null when offset doesn't exist
Denny Shimkoski authored
29
30 class Text_PathNavigator_AllTests
31 {
32 public static function main()
33 {
34 PHPUnit_TextUI_TestRunner::run(self::suite());
35 }
36
37 public static function suite()
38 {
39 $suite = new PHPUnit_Framework_TestSuite('Text_PathNavigator package');
79db783 Get unit tests working.
Daniel Convissor authored
40
41 $dir = new GlobIterator(dirname(__FILE__) . '/*Test.php');
42 $suite->addTestFiles($dir);
43
f6ca28b - offsetGet() now returns null when offset doesn't exist
Denny Shimkoski authored
44 return $suite;
45 }
46 }
47
48 if (PHPUnit_MAIN_METHOD == 'Text_PathNavigator_AllTests::main') {
49 Text_PathNavigator_AllTests::main();
50 }
51
79db783 Get unit tests working.
Daniel Convissor authored
52 ?>
Something went wrong with that request. Please try again.