From 57b95e88fdffbaf0e412b9522ca195522d8089ea Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Sat, 13 Jun 2026 18:13:57 +0800 Subject: [PATCH] =?UTF-8?q?removal(tests):=20=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E7=B1=BB=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6=E5=B9=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B8=B8=E9=87=8F=E6=B5=8B=E8=AF=95=E6=9C=9F?= =?UTF-8?q?=E6=9C=9B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除抽象类方法调用测试文件 tests/core/classes/abstract.phpt - 删除抽象类实例化测试文件 tests/core/classes/class_abstract.phpt - 删除对象克隆测试文件 tests/core/classes/clone_004.phpt - 更新常量基本测试期望输出,移除未定义属性警告信息 - 重命名构造函数析构函数测试中的变量名 $t 为 $t2 --- tests/core/classes/abstract.phpt | 34 --------- tests/core/classes/class_abstract.phpt | 32 -------- tests/core/classes/clone_004.phpt | 83 --------------------- tests/core/classes/constants_basic_002.phpt | 2 - tests/core/classes/ctor_dtor.phpt | 3 +- 5 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 tests/core/classes/abstract.phpt delete mode 100644 tests/core/classes/class_abstract.phpt delete mode 100644 tests/core/classes/clone_004.phpt diff --git a/tests/core/classes/abstract.phpt b/tests/core/classes/abstract.phpt deleted file mode 100644 index fec3f4b3..00000000 --- a/tests/core/classes/abstract.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -ZE2 An abstract method may not be called ---FILE-- -show(); - $t->error(); - - echo "Done\n"; // shouldn't be displayed -} -?> ---EXPECTF-- -Call to function show() - -Fatal error: Uncaught Error: Cannot call abstract method fail::show() in %s -Stack trace: -#0 Unknown(0) : %s -#1 {main} - thrown in Unknown(0) : %s diff --git a/tests/core/classes/class_abstract.phpt b/tests/core/classes/class_abstract.phpt deleted file mode 100644 index e652019d..00000000 --- a/tests/core/classes/class_abstract.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -ZE2 An abstract class cannot be instantiated ---FILE-- -show(); - - $t = new base(); - $t->show(); - - echo "Done\n"; // shouldn't be displayed -} -?> ---EXPECTF-- -base - -Fatal error: Uncaught Error: Cannot instantiate abstract class base in %s:%d -Stack trace: -#0 Unknown(0) : %s -#1 {main} - thrown in %s on line %d diff --git a/tests/core/classes/clone_004.phpt b/tests/core/classes/clone_004.phpt deleted file mode 100644 index cdb4581c..00000000 --- a/tests/core/classes/clone_004.phpt +++ /dev/null @@ -1,83 +0,0 @@ ---TEST-- -ZE2 object cloning, 4 ---FILE-- -a = array(1,2); - $o1->b = array(3,4); - $o1->show(); - - echo "Clone\n"; - $o2 = clone $o1; - $o2->show(); - - echo "Modify\n"; - $o2->a = 5; - $o2->b = 6; - $o2->show(); - - echo "Done\n"; -} -?> ---EXPECT-- -Original -object(test)#1 (2) { - ["a"]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - ["b"]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} -Clone -object(test)#2 (2) { - ["a"]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - ["b"]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} -Modify -object(test)#2 (2) { - ["a"]=> - int(5) - ["b"]=> - int(6) -} -Done diff --git a/tests/core/classes/constants_basic_002.phpt b/tests/core/classes/constants_basic_002.phpt index bbe33f8d..3b8dffcf 100644 --- a/tests/core/classes/constants_basic_002.phpt +++ b/tests/core/classes/constants_basic_002.phpt @@ -24,8 +24,6 @@ Read class constant. string(5) "hello" Fail to read class constant from instance. - -Warning: Undefined property: aclass::$myConst in %s on line %d NULL Class constant not visible in object var_dump. diff --git a/tests/core/classes/ctor_dtor.phpt b/tests/core/classes/ctor_dtor.phpt index bcd73430..9d40e52e 100644 --- a/tests/core/classes/ctor_dtor.phpt +++ b/tests/core/classes/ctor_dtor.phpt @@ -24,7 +24,8 @@ function main() { $t = new early(); $t->__construct(); unset($t); - $t = new late(); + + $t2 = new late(); //unset($t); delay to end of script echo "Done\n";