Example #1
0
 /**
  * Test the version evaluation
  *
  * @covers \Psecio\Iniscan\Rule::isVersion
  */
 public function testAboveVersion()
 {
     // a very old PHP release...please tell me you're not using it
     $phpVersion = '3.0';
     $rule = new Rule(array(), 'testing');
     // Ensure that the running version is fine
     $this->assertTrue($rule->isVersion($phpVersion));
     // Assume we're using 5.6 for now
     $rule->setVersion('5.6');
     // 5.6 > 3.0, so we get true
     $this->assertTrue($rule->isVersion($phpVersion));
     // Newer flavourful versions
     $phpVersion = '7.0';
     // 5.6 < 7.0, so we get false
     $this->assertNotTrue($rule->isVersion($phpVersion));
 }
Example #2
0
 /**
  * Test the version evaluation
  *
  * @covers \Psecio\Iniscan\Rule::isVersion
  */
 public function testAboveVersion()
 {
     // a very old PHP release...please tell me you're not using it
     $phpVersion = '3.0';
     $rule = new Rule(array(), 'testing');
     $this->assertTrue($rule->isVersion($phpVersion));
 }