/**
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::process
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::writeDataObject
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::writeModelAdmin
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::getDataObjectSSViewer
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::getModelAdminSSViewer
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::processFlatStorage
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::processParentStorage
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::processChildStorage
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::isReference
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::beautify
  * @covers \Heystack\Core\DataObjectGenerate\DataObjectGenerator::output
  */
 public function testProcessMakesFiles()
 {
     $referenceSchema = $this->getMock('Heystack\\Core\\DataObjectSchema\\SchemaInterface');
     $this->schemaService->expects($this->once())->method('getSchemas')->will($this->returnValue([$schema = $this->getMock('Heystack\\Core\\DataObjectSchema\\SchemaInterface')]));
     $this->schemaService->expects($this->once())->method('hasSchema')->with('extra')->will($this->returnValue(true));
     $this->schemaService->expects($this->once())->method('getSchema')->with('extra')->will($this->returnValue($referenceSchema));
     $this->buildSchema($schema, 'Test', ['Test' => 'Text', 'Extra' => '+Extra'], [], []);
     $this->buildSchema($referenceSchema, 'Extra', ['Test' => 'Text']);
     ob_start();
     $this->generator->process();
     ob_end_clean();
     $this->assertTrue(file_exists($cachedTestFile = vfsStream::url('root/cache/CachedTest.php')));
     $this->assertTrue(file_exists($storedTestFile = vfsStream::url('root/StoredTest.php')));
     $this->assertTrue(file_exists(vfsStream::url('root/cache/GeneratedModelAdmin.php')));
     $this->assertContains('class CachedTest extends DataObject', file_get_contents($cachedTestFile));
     $this->assertContains('class StoredTest extends CachedTest', file_get_contents($storedTestFile));
 }
 /**
  * Generate the container
  * @param  Input\InputInterface   $input  The commands input
  * @param  Output\OutputInterface $output The commands output
  * @return null
  */
 protected function execute(Input\InputInterface $input, Output\OutputInterface $output)
 {
     $this->generatorService->process($input->getOption('force'));
     $output->writeln('Completed');
 }