com php-src: Added tests for the naming collision error message to handle all possible conditions: Zend/tests/name_collision_01 .phpt
Zend/tests/name_collision_02.phpt Zend/te sts/name_collision_03.phpt Zend/tests/name_collis ion_04.phpt Zend/tests/name_collision_05.ph pt
Zend/tests/name_collision_06.phpt
| From: | Kalle Sommer Nielsen | Date: | Thu, 26 Mar 2015 00:59:23 +0000 |
| Subject: | com php-src: Added tests for the naming collision error message to handle all possible conditions: Zend/tests/name_collision_01 .phpt Zend/tests/name_collision_02.phpt Zend/te sts/name_collision_03.phpt Zend/tests/name_collis ion_04.phpt Zend/tests/name_collision_05.ph pt Zend/tests/name_collision_06.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85882@lists.php.net to get a copy of this message | ||
Commit: 1c5994184f9505f1b157eb075926565739781bde
Author: Kalle Sommer Nielsen <kalle@php.net> Thu, 26 Mar 2015 01:59:23 +0100
Parents: 67b907f05901e972649be17c511536e1fca5aa2e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c5994184f9505f1b157eb075926565739781bde
Log:
Added tests for the naming collision error message to handle all possible conditions
Changed paths:
A Zend/tests/name_collision_01.phpt
A Zend/tests/name_collision_02.phpt
A Zend/tests/name_collision_03.phpt
A Zend/tests/name_collision_04.phpt
A Zend/tests/name_collision_05.phpt
A Zend/tests/name_collision_06.phpt
Diff:
diff --git a/Zend/tests/name_collision_01.phpt b/Zend/tests/name_collision_01.phpt
new file mode 100644
index 0000000..d6d4ae3
--- /dev/null
+++ b/Zend/tests/name_collision_01.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: class/class
+--FILE--
+<?php
+
+class A { }
+class A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare class A, because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_02.phpt b/Zend/tests/name_collision_02.phpt
new file mode 100644
index 0000000..3baeb45
--- /dev/null
+++ b/Zend/tests/name_collision_02.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: class/interface
+--FILE--
+<?php
+
+class A { }
+interface A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare interface A, because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_03.phpt b/Zend/tests/name_collision_03.phpt
new file mode 100644
index 0000000..6be4520
--- /dev/null
+++ b/Zend/tests/name_collision_03.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: class/trait
+--FILE--
+<?php
+
+class A { }
+trait A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_04.phpt b/Zend/tests/name_collision_04.phpt
new file mode 100644
index 0000000..b391a96
--- /dev/null
+++ b/Zend/tests/name_collision_04.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: interface/interface
+--FILE--
+<?php
+
+interface A { }
+interface A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare interface A, because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_05.phpt b/Zend/tests/name_collision_05.phpt
new file mode 100644
index 0000000...87af1f0
--- /dev/null
+++ b/Zend/tests/name_collision_05.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: interface/trait
+--FILE--
+<?php
+
+interface A { }
+trait A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_06.phpt b/Zend/tests/name_collision_06.phpt
new file mode 100644
index 0000000..cfeeed4
--- /dev/null
+++ b/Zend/tests/name_collision_06.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Object naming collision error: trait/trait
+--FILE--
+<?php
+
+trait A { }
+trait A { }
+
+?>
+--EXPECTF--
+Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d