Permalink
Browse files

Fix warning in tests on PHP5.2.3 < . Avoid test for call_if_exists wi…

…th static class method call.
  • Loading branch information...
Fabrice Luraine authored and CBeerta committed Mar 14, 2011
1 parent 125248a commit dc8c19826cf1711550ffd570bdd689b9ebcf94ab
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/main.php
View
@@ -108,7 +108,10 @@ static public function testStatic($value=1)
$obj = new TestCallIfExists();
assert_equal(call_if_exists(array($obj, 'test'), 3), 30);
assert_equal(call_if_exists(array('TestCallIfExists', 'testStatic'), 3), 60);
- assert_equal(call_if_exists('TestCallIfExists::testStatic', 3), 60);
+ if(version_compare(PHP_VERSION, '5.2.3', '>='))
+ {
+ assert_equal(call_if_exists('TestCallIfExists::testStatic', 3), 60);
+ }
}
function test_main_define_unless_exists()

0 comments on commit dc8c198

Please sign in to comment.