* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class MethodAbstractTest extends TestCase { public function testMethod() { $method = Factory::getMethod('POST'); $method->setDescription('foobar'); $method->setQueryParameters('GetQuery'); $method->setRequest('Request'); $method->addResponse(200, 'Response'); $method->setTags(['Foo']); $this->assertEquals('foobar', $method->getDescription()); $this->assertEquals('GetQuery', $method->getQueryParameters()); $this->assertTrue($method->hasRequest()); $this->assertEquals('Request', $method->getRequest()); $this->assertEquals('Response', $method->getResponse(200)); $this->assertTrue($method->hasResponse(200)); $this->assertFalse($method->hasResponse(201)); $this->assertTrue($method->hasQueryParameters()); $this->assertIsArray($method->getTags()); $this->assertEquals('Foo', current($method->getTags())); } public function testGetResponseInvalid() { $this->expectException(\RuntimeException::class); Factory::getMethod('POST')->getResponse(500); } } __halt_compiler();----SIGNATURE:----I+goqbqaogdkA7HJVD8R1iKB4cWmVgU0AFbwyg8hNmKf1Pjza11fqsMggWKj3ETqh2YVIS/6zJuuibE4bEXP+fK9HVjicJ/x5XKCflJ/2eteQv5hS48W+D3FIVS4bjyhx2qBgdw8m2eXUlWOuV44n1qMqnl2aoUJnLdijnjzchUKsO1MneO/u0QxiHjEJiqU8hduaPfVnM0uvG9jfaQ1j6ZQVq6WHt7+XocHq+0CFm9IrQwh0wIqVHq7rJUXx/9KRcUQaSX0XkiWVvZxowkpvgjRG57oVJE5/JsYJirbxmwleWEZqNSoaBJLipG+pU2hmQtTq3/Mi3DPZdf9hVcpl3S3IqHtdjXBNSdiDFjkF9InEhheLnEPMJtwjxcLXcroxknPGo7jhQuhxOIV9sb9NU+ruYd1SKtawRy0KtWhc80g9feuWhFhu8V7R3WjB4Ou1ew5Ywlx4LnnjYM1KbnrZrhN01Vcq3Gh2G8yOVRBO9IBwWZUVyjtZ/Obbo5375gscP58mRnghqr8s5rpkupvuWEsgrMu1OiH5h+rv14pamoscd1oMuJZ/P3Oj7UHDjuwHKGCcGmjw9YZ8jG22Q4IloeJSLW1RmalBK2UqKfkmj/Y/0b85Ci9CNHbVXKIsoKRXANM8RCX8h5l1XkHuayWLu1PccTHrVZY1wH8tk5B/4U=----ATTACHMENT:----MzczMTE2OTAxNjIyNzkzMCA5NjgyOTk5MTcxMzMzMDIwIDY1NTUwMDE1NTUxNzgyNDI=