FBMock_Utils::isHHVM PHP Method

isHHVM() public static method

public static isHHVM ( )
    public static function isHHVM()
    {
        return defined('HPHP_VERSION');
    }

Usage Example

    public function testMethodWithTypehintedArguments()
    {
        $this->refMethod = new ReflectionMethod('FBMock_MethodGeneratorTestObj::methodWithHintsAndDefaults');
        if (FBMock_Utils::isHHVM()) {
            $expected = <<<'EOD'
public function methodWithHintsAndDefaults(stdClass $o, array $a=array (
  0 => "asdf",
), $n=NULL)
EOD;
            $this->assertCorrectHeader($expected);
        } else {
            $expected = <<<'EOD'
public function methodWithHintsAndDefaults(stdClass $o, array $a=array (
  0 => 'asdf',
), $n=NULL)
EOD;
            $this->assertCorrectHeader($expected);
        }
    }
All Usage Examples Of FBMock_Utils::isHHVM