Example #1
0
 /**
  * @dataProvider providerFunctionNames
  */
 public function testAtLeast($name, $exists)
 {
     $this->_package->fnExists($name);
     if (!is_null($exists)) {
         $this->assertEquals($exists, $this->_result->wasSuccessful(), "Function '{$name}' returned invalid result");
     }
 }
Example #2
0
 /**
  * @covers phpRack_Package_Php::atLeast
  * @covers phpRack_Package_Php::_sizeFormat
  */
 public function testIniGigaPrefixMultiplier()
 {
     ini_set('default_socket_timeout', '60G');
     $this->_package->ini('default_socket_timeout')->atLeast(60 * phpRack_Package_Php::SIZE_FORMAT ^ 3);
     $this->assertTrue($this->_result->wasSuccessful());
 }
Example #3
0
 /**
  * Tests if lint does not check folders.
  */
 public function testLintWithFolder()
 {
     $this->_package->lint($this->_testFilesDir . '/php/empty');
     $this->assertTrue($this->_result->wasSuccessful());
 }
Example #4
0
 /**
  * @dataProvider testAtLeastProvider
  */
 public function testAtLeast($data)
 {
     $this->_package->ini('memory_limit')->atLeast($data[0]);
     $this->{$data[1]}($this->_result->wasSuccessful());
 }
Example #5
0
 /**
  * Tests direct fail function.
  */
 public function testFailure()
 {
     $this->_package->fail("Failed test");
     $this->assertFalse($this->_result->wasSuccessful());
 }