* @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:----GJmZLGGo6JQfZBlp+ivDo90MLqH50qe9+7va0a0BVxbm3D5uoR5i4ACgwAlV7DkXTxAqLN6QNgE7PLd1r9UUiWVMLmBI2rTPOkU8kkxaVBTcKY8iggRu78YlGUU61ej8RP2+wYjyYFvB/8v6iN+4Y1r5mFIXJ7jGEGjLIfxbfxBgI4Al0hQfomL+BJH8FPkQL9N3LbP3GE/LzRpGsOD0cK75WbjQpNd/HjKHessiXeYP27cQyTYIS+bWce1kTzv6AK1vfXRtoBwDOLnNXMp5a0FkzgTpTdBUu1qAvA3TYLWSnph+hmj4hRIPMa0+thzSWmKO29g9GmDeR7wmSsvDfYpUrC4ihANsUS+7PTenh6zGlHxoGvC2cRZnkU1339GbjsfPveacirMxe6Ap5ZFo8Qld47rPqJWebhjtzhB8OaDCR1pECArUZdft6dGtvNto7ZmVrUojNb4CJadQSkNp9UXRCIqlWZB9z6VeU1fpS5+8Jd0a/A5sfNK0OVtdDpFNMUby35MmMOni1kW5AW0fhugKFMIVu/3OGVoCRr8WbL5Cu/2C4V4OZFc2Ge8b4YoVFRWCCEcyJx1/dRaaXMnGQNap9pIJ8IpFZrp5O8G1sbM6boxEkori9Z19RXd0p6cYeacfRkrHirG+OqKy42GHBO4pz5fzVgAU7uiRFQlAeb8=----ATTACHMENT:----NjM0NTUyNDA5NjU5MzM1OCAyOTg3NTIzMTQyNjQzNjAyIDQyMDQzMDk2MDMxMDEwMDM=