From: Felipe Pena Date: Thu, 6 May 2010 19:21:11 +0000 (+0000) Subject: - New tests X-Git-Tag: php-5.4.0alpha1~191^2~1540 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b7463bb8a7682b207d6c5653bd858116aaeddba;p=php - New tests --- diff --git a/Zend/tests/traits/error_010.phpt b/Zend/tests/traits/error_010.phpt new file mode 100644 index 0000000000..8f3f7dddfd --- /dev/null +++ b/Zend/tests/traits/error_010.phpt @@ -0,0 +1,27 @@ +--TEST-- +Trying to exclude trait method multiple times +--FILE-- +test()); + +?> +--EXPECTF-- +Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d diff --git a/Zend/tests/traits/error_011.phpt b/Zend/tests/traits/error_011.phpt new file mode 100644 index 0000000000..a6372a43d4 --- /dev/null +++ b/Zend/tests/traits/error_011.phpt @@ -0,0 +1,28 @@ +--TEST-- +Testing trait collisions +--FILE-- +test()); + +?> +--EXPECTF-- +Warning: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d + +Fatal error: Call to undefined method bar::test() in %s on line %d diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt new file mode 100644 index 0000000000..b90e32ac84 --- /dev/null +++ b/Zend/tests/traits/error_012.phpt @@ -0,0 +1,19 @@ +--TEST-- +Trying to access a protected trait method +--FILE-- +test()); + +?> +--EXPECTF-- +Fatal error: Call to protected method bar::test() from context '' in %s on line %d diff --git a/Zend/tests/traits/error_013.phpt b/Zend/tests/traits/error_013.phpt new file mode 100644 index 0000000000..d9fda2d005 --- /dev/null +++ b/Zend/tests/traits/error_013.phpt @@ -0,0 +1,19 @@ +--TEST-- +Trying to use static as method modifier +--FILE-- +test()); + +?> +--EXPECTF-- +Fatal error: Cannot use 'static' as method modifier in %s on line %d diff --git a/Zend/tests/traits/error_014.phpt b/Zend/tests/traits/error_014.phpt new file mode 100644 index 0000000000..be1c91977c --- /dev/null +++ b/Zend/tests/traits/error_014.phpt @@ -0,0 +1,23 @@ +--TEST-- +Trying to override final method +--FILE-- +test()); + +?> +--EXPECTF-- +Fatal error: Cannot override final method baz::test() in %s on line %d diff --git a/Zend/tests/traits/error_015.phpt b/Zend/tests/traits/error_015.phpt new file mode 100644 index 0000000000..6d21c51bf9 --- /dev/null +++ b/Zend/tests/traits/error_015.phpt @@ -0,0 +1,25 @@ +--TEST-- +Trying to add an alias to a trait method where there is another with same name +--FILE-- +test()); + +?> +--EXPECTF-- +Fatal error: Failed to add aliased trait method (zzz) to trait table. Probably there is already a trait method with same name in %s on line %d