2

PHPUnit 可以毫无问题地运行常规测试,但它错误地将这个基本的 PHPT 示例报告为失败,而它应该通过:

--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 版本之外的任何差异。

4

0 回答 0