コード例 #1
0
ファイル: DisBoardTest.php プロジェクト: oneismore/Discuss
 public function setUp()
 {
     parent::setUp();
     $this->board = $this->modx->newObject('disBoard');
     $this->board->fromArray(array('id' => 12345, 'name' => 'Unit Test Board'), '', true, true);
     $this->discuss->loadRequest();
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->post = $this->modx->newObject('disPost');
     $this->post->fromArray(array('id' => 12345, 'title' => 'Unit Test Parser Post'), '', true, true);
     $this->post->loadParser();
     $this->parser =& $this->post->parser;
 }
コード例 #3
0
 public function setUp()
 {
     parent::setUp();
     $this->modx->loadClass('DiscussController', $this->discuss->config['modelPath'] . 'discuss/', true, true);
     $this->controller = $this->getMockForAbstractClass('DiscussController', array(&$this->discuss));
     $this->controller->expects($this->any())->method('process')->will($this->returnValue(array()));
     $this->controller->expects($this->any())->method('getSessionPlace')->will($this->returnValue(''));
     $this->controller->expects($this->any())->method('getPageTitle')->will($this->returnValue(''));
 }