在PHP 5.4.6上使用PHPUnit运行PHPT时出现错误故障

时间:2012-08-21 15:44:44

标签: php phpunit phpt

PHPUnit可以毫无问题地运行常规测试,但它错误地将此basic PHPT example报告为应该通过时失败:

--TEST--
strtr() function - basic test for strstr()
--FILE--
<?php
/* Do not change this test it is a README.TESTING example. */
$trans = array("hello"=>"hi", "hi"=>"hello", "a"=>"A", "world"=>"planet");
var_dump(strtr("# hi all, I said hello world! #", $trans));
?>
--EXPECT--
string(32) "# hello All, I sAid hi planet! #"

使用phpunit basic-format.phpt运行

There was 1 failure:

1) basic-format.php
--- Expeccted
+++ Actual
@@ @@
- # hello All, I sAid hi planet! #
+

我使用的是Windows / PHP 5.4.6。这个测试在PHP 5.4.0下运行良好,但除了php版本之外,我无法确定任何差异。

0 个答案:

没有答案