예제 #1
0
 /**
  * @dataProvider getFunctions
  *
  * @param string $functionName
  */
 public function testManuallyDb($functionName)
 {
     $reflection = $this->getReflector()->getFunction($functionName);
     if ($reflection) {
         try {
             $standardFunctionReflection = new \ReflectionFunction($functionName);
         } catch (\ReflectionException $e) {
             parent::markTestSkipped('Function doest not exist');
             return;
         }
         parent::assertSame($standardFunctionReflection->getNumberOfRequiredParameters(), $reflection->getNumberOfRequiredParameters());
         parent::assertSame($standardFunctionReflection->getNumberOfParameters(), $reflection->getNumberOfParameters());
         if ($reflection->getNumberOfParameters()) {
             foreach ($reflection->getParameters() as $key => $parameter) {
                 parent::assertSame($parameter, $reflection->getParameter($key));
                 parent::assertNotEmpty($parameter->getName());
                 parent::assertInternalType('integer', $parameter->getType());
                 parent::assertInternalType('boolean', $parameter->isRequired());
             }
         }
         return;
     }
     parent::markTestSkipped('Unknown manually reflection for function: ' . $functionName);
 }