isPHP53() public static method

public static isPHP53 ( string $current = PHP_VERSION ) : boolean
$current string
return boolean
Example #1
0
 public function testIsPHP53()
 {
     isTrue(Sys::isPHP53('5.3'));
     isTrue(Sys::isPHP53('5.3.0'));
     isTrue(Sys::isPHP53('5.3.1'));
     isFalse(Sys::isPHP53('5.2'));
     isFalse(Sys::isPHP53('5.2.3'));
     isFalse(Sys::isPHP53('5.4'));
     isFalse(Sys::isPHP53('7.3'));
 }
Example #2
0
 protected function setUp()
 {
     parent::setUp();
     if (!class_exists('\\JBZoo\\Utils\\Sys')) {
         throw new Exception('jbzoo/utils required for HttpServer unit-tests');
     }
     if (!class_exists('\\JBZoo\\HttpClient\\HttpClient')) {
         throw new Exception('jbzoo/http-client required for HttpServer unit-tests');
     }
     if (Sys::isPHP53() || Sys::isHHVM()) {
         skip('PHP 5.3.x/7.0/hhvm doen\'t support built-in web-server');
     }
     FS::rmdir(PROJECT_BUILD . '/coverage_cov');
     FS::rmdir(PROJECT_BUILD . '/coverage_html');
     FS::rmdir(PROJECT_BUILD . '/coverage_xml');
 }
Example #3
0
 /**
  * @return bool
  */
 protected function _isPHP53()
 {
     return Sys::isPHP53();
 }