* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class RamlTest extends GeneratorTestCase { public function testGenerate() { $generator = new Raml(1, 'http://api.phpsx.org', 'urn:schema.phpsx.org#'); $actual = $generator->generate($this->getSpecification()); $expect = file_get_contents(__DIR__ . '/resource/raml.yaml'); $expect = str_replace(array("\r\n", "\r"), "\n", $expect); $this->assertEquals($expect, $actual, $actual); } public function testGenerateAll() { $generator = new Raml(1, 'http://api.phpsx.org', 'urn:schema.phpsx.org#'); $actual = $generator->generate($this->getSpecificationCollection()); $expect = file_get_contents(__DIR__ . '/resource/raml_collection.yaml'); $expect = str_replace(array("\r\n", "\r"), "\n", $expect); $this->assertEquals($expect, $actual, $actual); } public function testGenerateComplex() { $generator = new Raml(1, 'http://api.phpsx.org', 'urn:schema.phpsx.org#'); $generator->setDescription('Foobar'); $actual = $generator->generate($this->getSpecificationComplex()); $expect = file_get_contents(__DIR__ . '/resource/raml_complex.yaml'); $expect = str_replace(array("\r\n", "\r"), "\n", $expect); $this->assertEquals($expect, $actual, $actual); } } __halt_compiler();----SIGNATURE:----PLCj1bmxpOcT823MvtUoRvVJCXRY1S+KIkRo0waSWpcGw+6TZtYpwChTb3X3cgj1e9yHqUhY8MeBz5+6dKmYqdHM0BMJRJMv/atoOcIakxaNSI9PxAgEL102QlM8UABQhC+qCaT+xg4YDvwcu8lhYrEonBT8JUClppFfY+DCTHmpImpxslbLxPizRBFSJQWA0bODNGBge6b67KgPETkLo68FnFFKNc2voG651+UytO1olisujQPPy2VF4paKJnub6XNCFRZdheuyAhQvESaJej3zht4+UqSz6DYlrlJiIuosvIUtb9hiO/z1cqIWQCbuuqjRZfu7Ko1FOPwYlJaa6qqoTMifGzSOvOZJaXyfE94x7v/j5SL2FLZfjMQGbsYN1O3TZ7rnOB817inXQBLWxwh1LaPWIof2HoeRSVGvbyI+tGp91nd2aILSo1vSxrD9FNuYgFuKkdCYBkCdgvLc+yte43YMcSVe6nkO1MN8TR61n2t13QbHbXe3Gz5yQ5Hyjse9eZuAlAZNQlvgcPUy+CWvAn4xpmbsKTYjTnlh7kosHD2IUoyXWonhxAPLJZCH5Y/JagEqBtK85ToOLanPjDsa97s6WILkkdfLfHCeOixG8h/dxnzfPwc6p+9W/cpE7AezkAA1qPA5G5Os/5w8yn0Oxznw0kiDV9fF0ukv1dk=----ATTACHMENT:----OTk2MDUyODQwNTQ1NDExIDg3NzQ5MDU3MDg0ODk2MjMgODgzNTQwMzY3MTczMzI2OA==