* @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:----UGQY91Af9YS7laCgISifme2fiyJCdWVJ+Pdq2soe4JNLpg+LcK23fKnfgLVQ8dKsJyty+XlZlGilnHxYr1jh0kvnKmhApR3319qZiFkjso79+YkwvWq4EgVpAqU+kJTodP2S2qBT8TfnPjhPiFIMgrPalsoMwkPMb4jQjkB0cMgc7NAsDI8z/vdGDYw7CThkmFVCV257LUq2jpLeJyIt6dcUs2F25skGrbD20fJ9T7QoSCKf3K1VKnVD1ndrRWBQ9zWdMM97SvyUzN/6GtWOuP+mYj86nJ8LiYMxz3BXkAM1eb2vHXCNCX8kQKPx1N5O7654/hH3gQnUr7DbYhVFQvrnRwKcm2MJTuyVMKgVQ3Ddzdm8Rm+IX/asbgipk81jrcWS+vwHvHs7icr1Yl6R4asVxBj3BVFEbBBSjnoQVkaLSd0vmmYSJnElyZQquN5+rL9EPNeunpO0aKWLx7qlowsze8KxsDjSn0SVxrnOfG5GLF4rB72LZono8h4K4J+KHmcKQomMPn0CXxZMT1EeXrNojhcslt+6YLe13oK/eSbxRZQvXt5qt6vJ4JYcOw0SgzxxinLFyiS2DYDB/Pt1EFMIidNEh1PI+UZrHk7fe9tABqeAKrcHai1YaUR3No4loqMuAbYBu1tfJBjx+VZX2+XqP6+psh9to3btv8F7GnE=----ATTACHMENT:----NDI4NTIwMDc4NDEyMzU0MSA5Mjk5MDY2NDYzNDM5MjQ5IDQzNzkyMzYxNzE1OTUzODY=