diff --git a/Zend/tests/access_modifiers_008.phpt b/Zend/tests/access_modifiers_008.phpt index 70e789e99db..1cce8767d85 100644 --- a/Zend/tests/access_modifiers_008.phpt +++ b/Zend/tests/access_modifiers_008.phpt @@ -1,21 +1,60 @@ --TEST-- Inconsistencies when accessing protected members ---XFAIL-- -Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2 --FILE-- getMessage() . "\n"; + } + echo B1::ma() . "\n"; // protected method defined also in A + try { + echo B1::mp() . "\n"; // protected method defined also in A but as private + } catch (\Throwable $e) { + echo $e->getMessage() . "\n"; + } + try { + echo B1::mb() . "\n"; + } catch (\Throwable $e) { + echo $e->getMessage() . "\n"; + } + } } + B2::test(); ?> ---EXPECTF-- -Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d +--EXPECT-- +A::ma() +Call to private method A::mp() from scope B2 +B1::ma() +Call to protected method B1::mp() from scope B2 +Call to protected method B1::mb() from scope B2 diff --git a/Zend/tests/access_modifiers_009.phpt b/Zend/tests/access_modifiers_009.phpt index e36f609b9dc..7ce32818ca3 100644 --- a/Zend/tests/access_modifiers_009.phpt +++ b/Zend/tests/access_modifiers_009.phpt @@ -1,26 +1,58 @@ --TEST-- -Inconsistencies when accessing protected members - 2 ---XFAIL-- -Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2 +Inconsistencies when accessing protected members - is_callable --FILE-- ---EXPECTF-- +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(true) +---- +bool(true) +bool(false) +bool(true) +bool(false) bool(false) - -Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d