diff --git a/moodle/tests/fixtures/moodle_php_forbiddennamesasinvokedfunctions.php b/moodle/tests/fixtures/moodle_php_forbiddennamesasinvokedfunctions.php index e907148c..ca217e07 100644 --- a/moodle/tests/fixtures/moodle_php_forbiddennamesasinvokedfunctions.php +++ b/moodle/tests/fixtures/moodle_php_forbiddennamesasinvokedfunctions.php @@ -22,5 +22,5 @@ final($object); instanceof($object); private($object); -throw($object); +// throw($object); See https://github.com/wimg/PHPCompatibility/issues/118 trait($object); diff --git a/moodle/tests/moodlestandard_test.php b/moodle/tests/moodlestandard_test.php index d645e3a6..fac8b243 100644 --- a/moodle/tests/moodlestandard_test.php +++ b/moodle/tests/moodlestandard_test.php @@ -202,7 +202,7 @@ public function test_moodle_php_forbiddennamesasinvokedfunctions() { 22 => 'T_FINAL', 23 => 1, 24 => 1, - 25 => 1, + 25 => 0, 26 => 1)); $this->set_warnings(array()); @@ -279,9 +279,10 @@ public function test_phpcompatibility_php_deprecatedfunctions() { // - line => number of problems, or // - line => array of contents for message / source problem matching. // - line => string of contents for message / source problem matching (only 1). - $this->set_errors(array()); - $this->set_warnings(array( - 5 => array('function ereg_replace', 'use call_user_func instead', '@Source: PHPCompat'))); + $this->set_errors(array( + 5 => array('Function ereg_replace', 'Use call_user_func instead', '@Source: PHPCompat') + )); + $this->set_warnings(array()); // Let's do all the hard work! $this->verify_cs_results(); @@ -302,7 +303,7 @@ public function test_phpcompatibility_php_forbiddencalltimepassbyreference() { // - line => array of contents for message / source problem matching. // - line => string of contents for message / source problem matching (only 1). $this->set_errors(array( - 6 => array('call-time pass-by-reference is prohibited'), + 6 => array('call-time pass-by-reference is deprecated'), 7 => array('@Source: PHPCompat'))); $this->set_warnings(array());