/** * @throws Exception\AnnotationException * @return \SwaggerAssert\Container\Expected */ public function getExpected() { if (empty($this->analyzedData)) { throw new AnnotationException("Annotation data is empty.You need to call \\SwaggerAssert::analyze at the start of the test."); } $resources = new Resources($this->analyzedData); return $resources->expected(self::$httpMethod, self::$url, $this->onlyRequired); }
/** * @test * @param string $method * @param string $url * @dataProvider invalidMethodAndUrlProvider * @expectedException \SwaggerAssert\Exception\AnnotationException * @expectedExceptionMessage SWG\Model not found. you must write SWG\Operation TYPE and SWG\Model ID correctly */ public function expectedKeysNotFound($method, $url) { $resources = new Resources($this->fixture('analyzedDataSimple')); $resources->expected($method, $url, true); }