- 新增 array_method 测试文件 4.phpt - 添加 contains 方法的基本功能测试 - 验证严格模式下的类型检查行为 - 确保数组包含方法的正确性验证pull/1/head
parent
b1cc95818a
commit
8514d489a3
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||||
|
--TEST-- |
||||||
|
array_method: 1 |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
|
||||||
|
function main() |
||||||
|
{ |
||||||
|
require __DIR__ . '/../../../src/Assert.php'; |
||||||
|
|
||||||
|
$array = [1999, '2025']; |
||||||
|
Assert::true($array->contains(1999)); |
||||||
|
Assert::true($array->contains(2025)); |
||||||
|
$strict = true; |
||||||
|
Assert::false($array->contains(2025, $strict)); |
||||||
|
echo "done\n"; |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
done |
||||||
Loading…
Reference in new issue