Пример #1
0
 /**
  *
  * @param string $php
  * @return Swagger
  */
 protected function examineCode($php)
 {
     $swagger = new Swagger();
     $swagger->examine("<?php\n" . $php);
     return $swagger;
 }
Пример #2
0
    public function testInvalidCommentTypeNotification()
    {
        $code = <<<END
<?php
/*
 * @SWG\\Model(id="Participant")
 */
END;
        $swagger = new Swagger();
        \PHPUnit_Framework_Error_Notice::$enabled = true;
        $this->setExpectedException('PHPUnit_Framework_Error_Notice');
        $swagger->examine($code);
        $this->assertCount(0, $swagger->models);
    }