Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
14b5d8c
Updated magic method error message, updated existing tests, and added…
ollieread Aug 16, 2022
d0b5dea
Updated __isset enum tests
ollieread Aug 16, 2022
fa3244b
Remove __construct and __destruct tests in favour of existing ones
ollieread Aug 16, 2022
c90fa62
Fix existing enum tests to include new magic method error message
ollieread Aug 16, 2022
0f0f39d
Updated enum exception messages to be consistent, and not wrap enum n…
ollieread Aug 16, 2022
7f0b4dc
Merge branch 'master' into enum-stringable-and-magic-methods
ollieread Aug 16, 2022
bee3186
Normalise enum property error message to not quote enum name
ollieread Aug 16, 2022
533f0f8
Fixed internal enums test
ollieread Aug 16, 2022
2d07685
Unquote the integer value for invalid enum backing value error message
ollieread Aug 19, 2022
fd3dbad
Fixed expected error message for invalid int on enum backing test
ollieread Aug 19, 2022
4054284
Fix internal enum tests with correct error message
ollieread Aug 19, 2022
320344b
Change "may not" to "cannot" within the enum error messages
ollieread Aug 22, 2022
1b2a8cb
Added the enum class name to the enum error messages
ollieread Aug 22, 2022
0e3c8a3
Updated enum error messages in enum tests
ollieread Aug 22, 2022
3a90c2b
Remove return statement for enum __set test
ollieread Aug 22, 2022
44d0066
Correct plurality of "enum" in enum error messages
ollieread Aug 22, 2022
a985251
Update enum static property error messages to include enum class anme
ollieread Aug 22, 2022
688084d
Change enum error message when an enum has properties
ollieread Aug 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated enum error messages in enum tests
  • Loading branch information
ollieread committed Aug 22, 2022
commit 0e3c8a3f1878cfef0f1fb319ba29a8623711013e
2 changes: 1 addition & 1 deletion Zend/tests/enum/__clone.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __clone in %s on line %d
Fatal error: Enum Foo cannot include magic method __clone in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__debugInfo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __debugInfo in %s on line %d
Fatal error: Enum Foo cannot include magic method __debugInfo in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__get.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __get in %s on line %d
Fatal error: Enum Foo cannot include magic method __get in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__isset.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __isset in %s on line %d
Fatal error: Enum Foo cannot include magic method __isset in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__serialize.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __serialize in %s on line %d
Fatal error: Enum Foo cannot include magic method __serialize in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__set.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __set in %s on line %d
Fatal error: Enum Foo cannot include magic method __set in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__set_state.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __set_state in %s on line %d
Fatal error: Enum Foo cannot include magic method __set_state in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__sleep.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __sleep in %s on line %d
Fatal error: Enum Foo cannot include magic method __sleep in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__toString.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __toString in %s on line %d
Fatal error: Enum Foo cannot include magic method __toString in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__unserialize.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __unserialize in %s on line %d
Fatal error: Enum Foo cannot include magic method __unserialize in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__unset.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __unset in %s on line %d
Fatal error: Enum Foo cannot include magic method __unset in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/__wakeup.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __wakeup in %s on line %d
Fatal error: Enum Foo cannot include magic method __wakeup in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-constructors.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __construct in %s on line %d
Fatal error: Enum Foo cannot include magic method __construct in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-destruct.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __destruct in %s on line %d
Fatal error: Enum Foo cannot include magic method __destruct in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-implement-serializable-indirect.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ var_dump(unserialize(serialize(Foo::Bar)));
--EXPECTF--
Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d

Fatal error: Enums cannot implement the Serializable interface in %s on line %d
Fatal error: Enums Foo cannot implement the Serializable interface in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-implement-serializable.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ var_dump(unserialize(serialize(Foo::Bar)));
--EXPECTF--
Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d

Fatal error: Enums cannot implement the Serializable interface in %s on line %d
Fatal error: Enums Foo cannot implement the Serializable interface in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-name-property.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enums cannot include properties in %s on line %d
Fatal error: Enums may not include properties in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-properties.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enums cannot include properties in %s on line %d
Fatal error: Enums may not include properties in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-static-properties.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo {

?>
--EXPECTF--
Fatal error: Enums cannot include properties in %s on line %d
Fatal error: Enums may not include properties in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/no-value-property.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ enum Foo: int {

?>
--EXPECTF--
Fatal error: Enums cannot include properties in %s on line %d
Fatal error: Enums may not include properties in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/traits-no-__construct.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ var_dump(Bar::Baz);

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __construct in %s on line %d
Fatal error: Enum Bar cannot include magic method __construct in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/enum/traits-no-forbidden-methods.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ enum Suit {

?>
--EXPECTF--
Fatal error: Enum cannot include magic method __construct in %s on line %d
Fatal error: Enum Suit cannot include magic method __construct in %s on line %d