/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'BakeTemplate' . DS; $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\BakeTemplateTask', ['in', 'err', 'createFile', '_stop', 'clear'], [$io]); }
/** * setup test * * @return void */ public function setUp() { parent::setUp(); $this->io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Shell = $this->getMock('Bake\\Shell\\BakeShell', ['in', 'out', 'hr', 'err', 'createFile', '_stop'], [$this->io]); Configure::write('App.namespace', 'Bake\\Test\\App'); }
/** * setup test * * @return void */ public function setUp() { parent::setUp(); $this->out = new ConsoleOutput(); $this->io = new ConsoleIo($this->out); $this->Shell = $this->getMock('Bake\\Shell\\BakeShell', ['in', 'createFile', '_stop'], [$this->io]); Configure::write('App.namespace', 'Bake\\Test\\App'); }
/** * setUp method * * Ensure that the default template is used * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Template' . DS; Configure::write('App.namespace', 'Bake\\Test\\App'); $this->_setupTask(['in', 'err', 'error', 'createFile', '_stop']); TableRegistry::get('TemplateTaskComments', ['className' => __NAMESPACE__ . '\\TemplateTaskCommentsTable']); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Model' . DS; $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\ModelTask', ['in', 'err', 'createFile', '_stop', '_checkUnitTest'], [$io]); $this->Task->connection = 'test'; $this->_setupOtherMocks(); TableRegistry::clear(); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Test' . DS; $this->io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\TestTask', ['in', 'err', 'createFile', '_stop', 'isLoadableClass'], [$this->io]); $this->Task->name = 'Test'; $this->Task->Template = new TemplateTask($this->io); $this->Task->Template->interactive = false; }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\FixtureTask', ['in', 'err', 'createFile', '_stop', 'clear'], [$io]); $this->Task->Model = $this->getMock('Bake\\Shell\\Task\\ModelTask', ['in', 'out', 'err', 'createFile', 'getName', 'getTable', 'listAll'], [$io]); $this->Task->BakeTemplate = new BakeTemplateTask($io); $this->Task->BakeTemplate->interactive = false; $this->Task->BakeTemplate->initialize(); }
/** * setup method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Mailer' . DS; $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\MailerTask', ['in', 'err', 'createFile', '_stop'], [$io]); $this->Task->Test = $this->getMock('Bake\\Shell\\Task\\TestTask', [], [$io]); $this->Task->BakeTemplate = new BakeTemplateTask($io); $this->Task->BakeTemplate->initialize(); $this->Task->BakeTemplate->interactive = false; }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\FixtureTask', ['in', 'err', 'createFile', '_stop', 'clear'], [$io]); $this->Task->Model = $this->getMock('Bake\\Shell\\Task\\ModelTask', ['in', 'out', 'err', 'createFile', 'getName', 'getTable', 'listUnskipped'], [$io]); $this->Task->BakeTemplate = new BakeTemplateTask($io); $this->Task->BakeTemplate->interactive = false; $this->Task->BakeTemplate->initialize(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Fixture' . DS; }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Controller' . DS; $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\ControllerTask', ['in', 'out', 'err', 'hr', 'createFile', '_stop'], [$io]); $this->Task->name = 'Controller'; $this->Task->connection = 'test'; $this->Task->BakeTemplate = new BakeTemplateTask($io); $this->Task->Model = $this->getMock('Bake\\Shell\\Task\\ModelTask', ['in', 'out', 'err', 'createFile', '_stop'], [$io]); $this->Task->Test = $this->getMock('Bake\\Shell\\Task\\TestTask', [], [$io]); TableRegistry::get('BakeArticles', ['className' => __NAMESPACE__ . '\\BakeArticlesTable']); }
/** * setup method * * @return void */ public function setUp() { parent::setUp(); $this->_compareBasePath = Plugin::path('Bake') . 'tests' . DS . 'comparisons' . DS . 'Simple' . DS; $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false); $this->Task = $this->getMock('Bake\\Shell\\Task\\SimpleBakeTask', ['in', 'err', 'createFile', '_stop', 'name', 'template', 'fileName'], [$io]); $this->Task->Test = $this->getMock('Bake\\Shell\\Task\\TestTask', [], [$io]); $this->Task->BakeTemplate = new BakeTemplateTask($io); $this->Task->BakeTemplate->initialize(); $this->Task->BakeTemplate->interactive = false; $this->Task->pathFragment = 'Model/Behavior/'; $this->Task->expects($this->any())->method('name')->will($this->returnValue('behavior')); $this->Task->expects($this->any())->method('template')->will($this->returnValue('Model/behavior')); $this->Task->expects($this->any())->method('fileName')->will($this->returnValue('ExampleBehavior.php')); }