/**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // PageLayout対応
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     $this->generate('Videos.VideosEdit', array('components' => array('Auth' => array('user'), 'Session', 'Security')));
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('Config.language', 'ja');
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     $this->generate('AccessCounters.AccessCounters', ['components' => ['Auth' => ['user'], 'Session', 'Security']]);
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     Configure::write('Config.language', 'ja');
     $this->Questionnaire = ClassRegistry::init('Questionnaires.Questionnaire');
 }
 /**
  * testIndex method
  *
  * @return void
  */
 public function testIndex()
 {
     Configure::write('Config.language', 'ja');
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     $this->testAction('/public_space/public_space/index', array('return' => 'view'));
     $this->assertTextContains('<div class="box-site">', $this->view);
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // PageLayout対応
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     Configure::write('Config.language', 'ja');
     //テストコントローラ読み込み
     $this->generate('ContentComments.TestContentComments', array('components' => array('Auth' => array('user'), 'Session', 'Security')));
     // $this->controller->request->is('ajax') を成功させるために必要
     $this->controller->request = new CakeRequest();
     $this->controller->response = new CakeResponse();
     //コンポーネント読み込み
     $collection = new ComponentCollection();
     $this->contentComments = new ContentCommentsComponent($collection);
     $this->contentComments->viewSetting = false;
 }
Exemple #6
0
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->Frame = ClassRegistry::init('Frames.Frame');
     YACakeTestCase::loadTestPlugin($this, 'Frames', 'ModelWithAfterFrameSaveTestPlugin');
 }
 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     Configure::write('Config.language', 'ja');
 }
 /**
  * setUp
  *
  * @return   void
  */
 public function setUp()
 {
     parent::setUp();
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
     $this->generate('Frames.Frames', ['components' => ['Auth' => ['user'], 'Session', 'Security']]);
 }
 /**
  * setUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     YACakeTestCase::loadTestPlugin($this, 'NetCommons', 'TestPlugin');
 }
Exemple #10
0
 /**
  * Expect Topic->afterFrameSave() fail on topic frame setting save
  * e.g.) connection error
  *
  * @return void
  */
 public function testSearchableModelSaveFail()
 {
     $this->setExpectedException('InternalErrorException');
     $topicMock = $this->getMockForModel('Topics.Topic', ['save']);
     $topicMock->expects($this->any())->method('save')->will($this->returnValue(false));
     YACakeTestCase::loadTestPlugin($this, 'Topics', 'SearchablePlugin');
     $this->SearchableModel = ClassRegistry::init('SearchablePlugin.SearchableModel');
     $expectCount = $this->Topic->find('count', ['recursive' => -1]) + 1;
     $this->SearchableModel->saveTopic(['block_id' => 191, 'status' => NetCommonsBlockComponent::STATUS_PUBLISHED, 'is_active' => true, 'is_latest' => true, 'is_auto_translated' => true, 'is_first_auto_translation' => true, 'translation_engine' => '', 'title' => 'title', 'contents' => 'contents', 'plugin_key' => 'searchable', 'path' => '/searchable/searchable/view/191', 'from' => date('Y-m-d H:i:s')]);
     $this->assertEquals($expectCount, $this->Topic->find('count', ['recursive' => -1]));
 }