validate(); $this->assertEquals([], $components->getErrors()); $this->assertTrue($result); $this->assertAllInstanceOf(cebe\openapi\spec\Schema::class, $components->schemas); $this->assertCount(3, $components->schemas); $this->assertArrayHasKey('GeneralError', $components->schemas); $this->assertArrayHasKey('Category', $components->schemas); $this->assertArrayHasKey('Tag', $components->schemas); $this->assertAllInstanceOf(cebe\openapi\spec\Response::class, $components->responses); $this->assertCount(3, $components->responses); $this->assertArrayHasKey('NotFound', $components->responses); $this->assertArrayHasKey('IllegalInput', $components->responses); $this->assertArrayHasKey('GeneralError', $components->responses); $this->assertAllInstanceOf(cebe\openapi\spec\Parameter::class, $components->parameters); $this->assertCount(2, $components->parameters); $this->assertArrayHasKey('skipParam', $components->parameters); $this->assertArrayHasKey('limitParam', $components->parameters); $this->assertAllInstanceOf(cebe\openapi\spec\Example::class, $components->examples); $this->assertCount(0, $components->examples); // TODO $this->assertAllInstanceOf(cebe\openapi\spec\RequestBody::class, $components->requestBodies); $this->assertCount(0, $components->requestBodies); // TODO $this->assertAllInstanceOf(cebe\openapi\spec\Header::class, $components->headers); $this->assertCount(0, $components->headers); // TODO $this->assertAllInstanceOf(cebe\openapi\spec\SecurityScheme::class, $components->securitySchemes); $this->assertCount(2, $components->securitySchemes); $this->assertArrayHasKey('api_key', $components->securitySchemes); $this->assertArrayHasKey('petstore_auth', $components->securitySchemes); $this->assertAllInstanceOf(cebe\openapi\spec\Link::class, $components->links); $this->assertCount(0, $components->links); // TODO $this->assertAllInstanceOf(cebe\openapi\spec\Callback::class, $components->callbacks); $this->assertCount(0, $components->callbacks); // TODO } public function assertAllInstanceOf($className, $array) { foreach($array as $k => $v) { $this->assertInstanceOf($className, $v, "Asserting that item with key '$k' is instance of $className"); } } }__halt_compiler();----SIGNATURE:----Z/AInKGu/wRU6spMRHxQWL8eL/MZAoLHhTGgtAAmhooy6esG0UjpsZFPgiIsYq2giHwIQdbm0jj0aluiANOlRMFZ03kjP0AbSu9XaBg3nQBxm+g+82iIaREqvpyRKKv7sI5K60p3LL6Q9Blm8UBM0AA/Og6eNceBdXj771aMgjX6l4Ox1CeULW+7Rgw8WhZW8iH0lPqPb8d4d7b10a9MZ7k9UvjmRS7TKk3ddyTBgcyKX4tTZITznHWWIahwUFrnq1vBaE4zyajbzUZ3NdTXyu9Fv/eTHsAWc653wbCYoBDO4yz1V0gLDqOUQtLFd2i1NdMRZs0OZvYIlwyTtWBNjq2vGQUwDEvmWfBU3ZgbILn7TIAW3se6koDa0gEGD0J4SBxWf1tzLRFWLzV0QHyTGLxpxHhat2mCMO/PO6j2EklS8++PJ/gl+WOlPOxwgJmmOAFp5fa2Ve7nZoMZVVgFztZdP0QLWCKvm/bDwYUpnqrIieTa8gJmmvS9yFsF4RVS99oJArqMR9jHkYVxql0fwFDHwDY7LH2KZTqYgoXP2hIIQtFaLNcAGJIiRyJyd7WW7WlfnaleDt09YxkutnB6vbvRRs98wmf+Aun9ryLRz6krjvvYOk2GgZ4nl9ZZZG5BwcrVj+bpufU4oVw/AefXLY4HgvwimTFFxahH2QJVDe8=----ATTACHMENT:----Mzc1MDc2MDM0OTQ3Nzk2MCA5NDQyODMxODIzMjcwMjkgNTgwMDYwMzkxODQ4MjM4OQ==