* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class GoTest extends GeneratorTestCase { public function testGenerate() { $generator = new Go('http://api.foo.com'); $result = $generator->generate($this->getSpecification()); $target = __DIR__ . '/resource/go'; $this->writeChunksToFolder($result, $target); $this->assertFileExists($target . '/entry.go'); $this->assertFileExists($target . '/entry_collection.go'); $this->assertFileExists($target . '/entry_create.go'); $this->assertFileExists($target . '/entry_delete.go'); $this->assertFileExists($target . '/entry_message.go'); $this->assertFileExists($target . '/entry_patch.go'); $this->assertFileExists($target . '/entry_update.go'); $this->assertFileExists($target . '/foo_by_name_and_type_resource.go'); $this->assertFileExists($target . '/get_query.go'); $this->assertFileExists($target . '/path.go'); } public function testGenerateCollection() { $generator = new Go('http://api.foo.com'); $result = $generator->generate($this->getSpecificationCollection()); $target = __DIR__ . '/resource/go_collection'; $this->writeChunksToFolder($result, $target); $this->assertFileExists($target . '/bar_by_foo_resource.go'); $this->assertFileExists($target . '/bar_by_year_resource.go'); $this->assertFileExists($target . '/entry.go'); $this->assertFileExists($target . '/entry_collection.go'); $this->assertFileExists($target . '/entry_create.go'); $this->assertFileExists($target . '/entry_message.go'); $this->assertFileExists($target . '/foo_resource.go'); $this->assertFileExists($target . '/path_foo.go'); $this->assertFileExists($target . '/path_year.go'); } public function testGenerateComplex() { $generator = new Go('http://api.foo.com'); $result = $generator->generate($this->getSpecificationComplex()); $target = __DIR__ . '/resource/go_complex'; $this->writeChunksToFolder($result, $target); $this->assertFileExists($target . '/entry.go'); $this->assertFileExists($target . '/entry_message.go'); $this->assertFileExists($target . '/foo_by_name_and_type_resource.go'); $this->assertFileExists($target . '/path.go'); } } __halt_compiler();----SIGNATURE:----meeKZNrJwQyV1jUbVy0/loPevJulDo5W3Rlha2VkJqLhACfZKeN6UQKBuYgzuTU6ATj1o0csQpoFv2ZjAWV/2QLmfzVglUpNoMrbD+mA6A36bAOj7s89m0yCighAjLBk/scgmz1epVyejGDJgm5rzIV02sz+QuQOS9YO5/srUM8LzoyF75ulIxlTCHujRuQIOx+amHXqohCbdjT+Uj0ks8W2w7IxZ+/SIqv7fA0xS9eGFyRAjv5sPfk3IThPEJ91wMVlN9Dz0wgHw3fT2z0VLRdFJDGFY0TYVGaQ49YYkXSAPSvGoU94F+3XXh9LjQyaZJs2UCXYJsKQAhvEjECzI6eTpmCMD8440yxuU9CNZomi31N5hdpnITOjJ9OKn6EWa9QLpLt3aZwhrvvqyScmDUuiH5b6fUl0DQBkbek4BMpYOM/MYlJ7JOq2qnjL+/mge6SYbsPhIJr5qP2R5SvtRao2SF0vE8vAjiHIXNn8pcGuDZVH1suMaNFhxfIFmo1SAYnHkNGULaqb278BvqQTtrb7SZvV9bNInYIdS1elkjCSrdqwVEEZjqZGp4OgD+Amsru+5PegB+ZkVqO8thsGMOKTeH9DjlHCt0GOkpvZ9lUBJ0LB26KpV22O9cJsv1tRfIBIeebdq6F3LLDfq9LvTRZIrrrkErT6lbJWy3YqVbc=----ATTACHMENT:----NDc0MjM2MDg3OTA2OTUyMiA5ODEwNjQwNTg4NTU2NzQ0IDQyOTQwNjU3NjIwNTk5OTQ=