Dispatcher =& new TestTestTaskMockShellDispatcher(); $this->Task =& new MockTestTask($this->Dispatcher); $this->Task->Dispatch =& $this->Dispatcher; } /** * tearDown method * * @return void * @access public */ function tearDown() { ClassRegistry::flush(); } /** * Test that file path generation doesn't continuously append paths. * * @access public * @return void */ function testFilePathGeneration () { $file = TESTS . 'cases' . DS . 'models' . DS . 'my_class.test.php'; $this->Task->Dispatch->expectNever('stderr'); $this->Task->Dispatch->expectNever('_stop'); $this->Task->setReturnValueAt(0, 'in', 'y'); $this->Task->expectAt(0, 'createFile', array($file, '*')); $this->Task->bake('Model', 'MyClass'); $this->Task->setReturnValueAt(1, 'in', 'y'); $this->Task->expectAt(1, 'createFile', array($file, '*')); $this->Task->bake('Model', 'MyClass'); } } ?>