Exemple #1
0
 public function testCount()
 {
     $cb = Jit::JitFu("ReckiCT\\Mocks\\getCount");
     $array = [];
     for ($i = 0; $i < 1000; $i++) {
         $this->assertEquals($i, $cb($array), "For iteration {$i}");
         $array[] = $i;
     }
 }
Exemple #2
0
 /**
  * @covers ::JitFu
  * @covers ::getInstance
  * @covers ::__construct
  * @covers ::getFunctionAst
  * @covers ::getFunctionGraph
  * @covers ::compileFunctionJitFu
  * @covers ::parseFile
  * @covers ::findFunction
  */
 public function testIntegrationNonExistantFunction()
 {
     $this->assertEquals(__NAMESPACE__ . '\\doesntExist', Jit::JitFu(__NAMESPACE__ . '\\doesntExist'));
 }