* @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:----Va8cYp4rtpMXU3EW91v5OluG3h+2swnvFiT6p6Z+uIwnoUDG1jxSH8Wm+omIi1smwUu3PINVCNbwDT+f9LChsybVVMjASdsTn8hsYIlV7BZzZq/YgLmtoM9BJgrYclV/FOmbMy03VTRFD1xcUEZLA1IrWrCcgansglYe0z4ywzsm8tXxr0U073hCvvfqPhQpEtmuEGFv8y+9PCjJMIvKnlAHRA3Z+TXA62osi1nq/xnZ1BtDiY2v5JclP5sL74srptybQNubqtA1oUkFDkV1qo3xV9b5dfdN2kvKqPBSaCSUfDpo/X+/9R1yvt7PWotq4CdWIkaTA5IIFHaw2L3XABvZ8HWRNgtBGLk6SGc1LjG3rWHF+CP1JRHPcQOEu/SJIvvBuLuA8h6Xka9ZcH6Gwvq+2KO6TAhiO7ZnxbPQb7DdsnwhoRNjjS5s81GGB5ESAS/48p0gDE4Kc7z29+r9MIYV/9sXl6y/bLgK1GkGhGpi6dEkSeXAugjJPlAEwUf3uMOEO6doNcIINJO1nxMxjGvcV3LJ6M4+YzQxSSK6YIC/yUBEvP7S279QJgb5HRVf46gTOMYysGWpGIu0gKdwAiphqAtcI9vS5gHhSuRNgmQz7yFHqK6/5ttsUJHAn6t0ybyeiNLVAYj5bHQBaeh0Yy/V/NVBA8NzjrAypotUtb4=----ATTACHMENT:----ODIzOTQ0NTI0NjQ1Mzg3MyA4OTQzMzMxNjc1NDE0OTc2IDE2NzgwNzY4MDA4MzE4NDE=