Merge pull request #31 from stojg/php52-unittest-fixes

MINOR Skipping test when PHP Version is lower than 5.3.2
This commit is contained in:
Sam Minnée 2011-10-28 16:05:09 -07:00
commit 49866b25a2

View File

@ -829,6 +829,10 @@ class SiteTreeTest extends SapphireTest {
} }
function testClassDropdown() { function testClassDropdown() {
if(version_compare(PHP_VERSION, '5.3.2', '<')){
// @link http://www.php.net/manual/en/reflectionmethod.setaccessible.php
$this->markTestSkipped('Need PHP 5.3.2 to run this test.');
}
$sitetree = new SiteTree(); $sitetree = new SiteTree();
$method = new ReflectionMethod($sitetree, 'getClassDropdown'); $method = new ReflectionMethod($sitetree, 'getClassDropdown');
$method->setAccessible(true); $method->setAccessible(true);