* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class ParseCommandTest extends TestCase { public function testGeneratePhp() { $command = $this->getParseCommand(); $commandTester = new CommandTester($command); $commandTester->execute(array( 'source' => News::class, 'target' => __DIR__ . '/resource', '--format' => 'php', )); $actual = $commandTester->getDisplay(); $expect = 'Generated 5 files'; $this->assertEquals($expect, substr($actual, 0, strlen($expect)), $actual); $this->assertFileExists(__DIR__ . '/resource/Author.php'); $this->assertFileExists(__DIR__ . '/resource/Location.php'); $this->assertFileExists(__DIR__ . '/resource/Meta.php'); $this->assertFileExists(__DIR__ . '/resource/News.php'); $this->assertFileExists(__DIR__ . '/resource/Web.php'); } protected function getParseCommand() { return new ParseCommand(new SchemaManager(new AnnotationReader())); } } __halt_compiler();----SIGNATURE:----oBfkW9BHiFjwZ1QtCMlDbCuksjmkLAOxf6Uw2G4ev0rn+JqoxUWaL375G0TwYfZ4rsISKEjjd676P9SIxA0WH04YjNeyF5xWSAFt4D+qL+8vSKTcnBnRy41w57CJWKQj2qQmFA0b8g3FJ9wVzrA7Ev/vl5sg+MAj8x3YnLDnL5cUAZFDXjuEET4XQlUo6nGPeWXB1mIZYjlpQaHLZggtJGS0/cgrIEYWu/E7r64mFOA+KqgfQr0jU5eLccpLFMH91dRnWKvDBbZZS+LU2E/Vvc4+8EI5pylg/CIWxxWQW6YhZE6wBLROfBygTkgmrbCwRMAAPbEgb9L4znIgFJaWniUGp8YFXPJAQne29IK5H2m+mF66fRSkxHptX/fMTtmS//dOJcySTkO7AFA5hRIfmjNlA+jIB6Kyo6IEAh/pSvdFPYJaYZ1o9CxJnO3XQQFMbpflI5Z3vCGvaJg1EvngJtWSPWotCYHZCi78gZQ6qZOfbr5OxbWGu2aSH1Do8id7JNsDKpgw0cDlJbike18Hlk/xG1qOZ7hx6J+0lCKgdfsLk1u1PKt8hIRPBmMxoGo+hI69fvutV8GI8N9SoikCjLvaw5o7ttwkSC32moLV4LZ7KYnwkbCE+SWQiJ2/or/74vLrefszhWPKEpUyRMn9uWvZxyOJBaAaIZcYX0YRU/U=----ATTACHMENT:----NzMyMDM2NjY0Mjg2NTYxOCA0NzQ0MDMzMDU4NzgxMDA0IDgwMDU0NTE2MjI2MjQ0NjI=