Skip to content

Commit 234af00

Browse files
committed
Update tests for modern phpunit
git-svn-id: http://svn.php.net/repository/pear/packages/Text_LanguageDetect/trunk@321613 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 27300cd commit 234af00

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

tests/unittest.php renamed to tests/Text_LanguageDetectTest.php

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
*/
77

88
require_once 'Text/LanguageDetect.php';
9-
require_once 'PHPUnit.php';
10-
require_once 'Benchmark/Timer.php';
9+
require_once 'PHPUnit/Framework/TestCase.php';
1110

1211
class Text_LanguageDetectTest extends PHPUnit_Framework_TestCase {
1312

@@ -16,7 +15,7 @@ function setup ()
1615
$this->x = new Text_LanguageDetect;
1716

1817
if (!$this->x->_setup_ok($err)) {
19-
die($err->getMessage());
18+
$this->markTestSkipped($err->getMessage());
2019
}
2120
}
2221

@@ -1735,16 +1734,3 @@ function test_detection()
17351734
}
17361735

17371736
}
1738-
1739-
$timer = new Benchmark_Timer();
1740-
1741-
$timer->start();
1742-
$suite = new PHPUnit_TestSuite('langtest');
1743-
$result = PHPUnit::run($suite);
1744-
echo $result->toString();
1745-
$timer->stop();
1746-
$timer->display();
1747-
1748-
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 encoding=utf-8: */
1749-
1750-
?>

0 commit comments

Comments
 (0)