Example #1
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $Folder = new Folder($this->Task->path . 'BakeTestApp');
     $Folder->delete();
     unset($this->Task);
 }
 public function setUp()
 {
     parent::setUp();
     $this->table = new Table(['table' => 'articles']);
     $this->table->primaryKey('id');
     $this->behavior = new AuditLogBehavior($this->table, ['whitelist' => ['id', 'title', 'body', 'author_id']]);
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->usersTable);
     unset($this->postsTable);
     unset($this->tagsTable);
     parent::tearDown();
 }
 /**
  * setup method.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $templates = ['checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>'];
     $this->templates = new StringTemplate($templates);
     $this->context = $this->getMock('Cake\\View\\Form\\ContextInterface');
 }
 /**
  * tear down
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     $this->Noticias->removeBehavior("CakePtbr.AjusteData");
     unset($this->Noticias, $this->Noticias);
     TableRegistry::clear();
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->stub = new ConsoleOutput();
     $this->io = new ConsoleIo($this->stub);
     $this->helper = new ProgressHelper($this->io);
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload();
     ConnectionManager::drop('test_variant');
     ConnectionManager::dropAlias('other_name');
 }
 public function tearDown()
 {
     unset($this->Notifier);
     unset($this->Manager);
     unset($this->Model);
     parent::tearDown();
 }
Example #9
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload();
     Router::reload();
     Router::defaultRouteClass('Cake\\Routing\\Route\\Route');
 }
 /**
  * setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $templates = ['textarea' => '<textarea name="{{name}}"{{attrs}}>{{value}}</textarea>'];
     $this->context = $this->getMock('Cake\\View\\Form\\ContextInterface');
     $this->templates = new StringTemplate($templates);
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Cache::drop('redis');
     Cache::drop('redis_groups');
     Cache::drop('redis_helper');
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Authorization);
     ResolvableAuthorizationInstance::reset();
     ResolvableAuthorizationRegistry::reset();
     parent::tearDown();
 }
Example #13
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Number);
     I18n::locale($this->locale);
     Number::defaultCurrency(false);
 }
Example #14
0
 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Shell);
     Configure::write('App.namespace', 'App');
     Plugin::unload();
 }
Example #15
0
 /**
  * Tear down method.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload('Union/Core');
     Plugin::unload('TestPlugin');
     unset($this->ToolBar, $this->View);
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->FixedLengthExport);
     parent::tearDown();
     //不要なファイルを削除する
     unlink($this->test2_fixed_length_path);
 }
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'Spekkoek\\Test\\TestApp');
     $this->factory = new ControllerFactory();
     $this->response = $this->getMock('Cake\\Network\\Response');
 }
Example #18
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->View = new View();
     $this->Time = new TimeHelper($this->View);
     Time::$defaultLocale = 'en_US';
 }
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     //fixtureの終了
     $this->fixtureManager->shutdown();
     unset($this->fixtureManager);
     parent::tearDown();
 }
Example #20
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Acl);
     Cache::clear(false, 'tests');
     Cache::drop('tests');
 }
 /**
  * TearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     if (!empty($this->_case)) {
         $_GET['case'] = $this->_case;
     }
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Router::reload();
     Router::connect('/:controller', ['action' => 'index']);
     Router::connect('/:controller/:action/*');
 }
Example #23
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload('TestPlugin');
     Plugin::unload('TestTheme');
     unset($this->View);
 }
 /**
  * Setup
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Cache::clear(false);
     $this->apiFolderName = 'NonExistingApiPrefixedFolder';
     $this->apiFolderPath = APP . 'Controller' . DS . $this->apiFolderName;
 }
Example #25
0
 public function setUp()
 {
     parent::setUp();
     $templates = ['button' => '<button{{attrs}}>{{text}}</button>'];
     $this->templates = new StringTemplate($templates);
     $this->context = $this->getMockBuilder('Cake\\View\\Form\\ContextInterface')->getMock();
 }
 /**
  * setup method.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $templates = ['select' => '<select name="{{name}}"{{attrs}}>{{content}}</select>', 'selectMultiple' => '<select name="{{name}}[]" multiple="multiple"{{attrs}}>{{content}}</select>', 'option' => '<option value="{{value}}"{{attrs}}>{{text}}</option>', 'optgroup' => '<optgroup label="{{label}}"{{attrs}}>{{content}}</optgroup>'];
     $this->context = $this->getMock('Cake\\View\\Form\\ContextInterface');
     $this->templates = new StringTemplate($templates);
 }
Example #27
0
 /**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Plugin::unload();
     Router::fullBaseUrl('');
     Configure::write('App.fullBaseUrl', 'http://localhost');
 }
 /**
  * tearDown()
  *
  * @return void
  */
 public function tearDown()
 {
     if (file_exists($this->Task->bootstrap)) {
         unlink($this->Task->bootstrap);
     }
     parent::tearDown();
 }
Example #29
0
 public function setUp()
 {
     parent::setUp();
     $View = new View();
     $this->RpgText = new RpgTextHelper($View);
     //        $this->Characters = TableRegistry::get('Characters');
 }
Example #30
0
 /**
  * setUp
  *
  * Create a mock for all tests to use
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $io = $this->getMock('Cake\\Console\\ConsoleIo', [], [], '', false);
     $this->sut = $this->getMock('Cake\\Upgrade\\Shell\\Task\\AppUsesTask', ['in', 'out', 'hr', 'err', '_shouldProcess'], [$io]);
     $this->sut->loadTasks();
 }