コード例 #1
0
 /**
  * @dataProvider dataTestApiDeclaration
  */
 public function testApiDeclaration($resource, $expected)
 {
     set_error_handler(array($this, 'handleDeprecation'));
     $data = $this->extractor->all();
     restore_error_handler();
     $actual = $this->formatter->format($data, $resource);
     $this->assertEquals($expected, $actual);
 }
コード例 #2
0
 /**
  * Format documentation data for one route.
  *
  * @param ApiDoc $annotation
  *                           return string|array
  */
 public function formatOne(ApiDoc $annotation)
 {
     return $this->formatter->formatOne($annotation);
 }
コード例 #3
0
 protected function getApiDeclaration(array $data, $resource)
 {
     return $this->formatter->format($data, '/' . $resource);
 }