Commit Graph

16 Commits

Author SHA1 Message Date
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Igor Wiedler
602fef0e52 Clarify type of use in error messages 2013-10-14 23:32:11 +02:00
Igor Wiedler
e23ad4eeb2 Add "Done" output to distinguish hard from soft failures 2013-10-14 23:21:06 +02:00
Anthony Ferrara
d7e3aca9c9 Fix issue with global fallback when not in global space 2013-08-30 11:53:57 -04:00
Igor Wiedler
e14a769c56 Add test for conditional function declaration 2013-08-29 17:16:18 +02:00
Igor Wiedler
6263f221ff Handle case sensivity of constants (nikic) 2013-08-25 16:21:51 +02:00
Igor Wiedler
84c8aa3691 self and parent are valid function and const names (nikic) 2013-08-25 15:08:26 +02:00
Igor Wiedler
bc473228c8 Adjust some test names, remove obsolete and duplicate tests (nikic) 2013-08-25 14:03:07 +02:00
Igor Wiedler
85d4cfb00d Disallow using functions/consts defined in the same file
* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists
2013-08-25 00:02:46 +02:00
Igor Wiedler
5b18530e8c Add test cases for conflicting use and definition in same ns (stas) 2013-08-23 23:31:17 +02:00
Igor Wiedler
31d77053a1 More test cases for conflicting aliases 2013-08-22 15:51:26 +02:00
Igor Wiedler
2dbbb8ae4b Add test case for conflicting use and use function alias (stas) 2013-08-22 15:51:26 +02:00
Igor Wiedler
e1125a6a89 Correctly distinguish between functions and constants
So far 'use function' applied to both constants and functions. This
patch correctly separates the two.
2013-08-22 15:51:26 +02:00
Igor Wiedler
5dd41627be Add new 'use function' sequence for importing namespaced functions
This is specified as the use_function RFC:

* https://wiki.php.net/rfc/use_function
2013-08-22 15:51:25 +02:00