public function setUp()
 {
     parent::setUp();
     $this->_oIssue = AM_Model_Db_Table_Abstract::factory('issue')->findOneBy(array('id' => 1));
     $this->_oRevisionSetMock = $this->getMock('AM_Model_Db_Rowset_Revision', array('moveToIssue'), array(array('readOnly' => true)));
     $this->_oIssue->setRevisions($this->_oRevisionSetMock);
 }
 public function setUp()
 {
     parent::setUp();
     $this->_oApplication = AM_Model_Db_Table_Abstract::factory('application')->findOneBy(array('id' => 1));
     $this->_oIssueSetMock = $this->getMock('AM_Model_Db_Rowset_Issue', array('moveToUser'), array(array("readOnly" => true)));
     $this->_oApplication->setIssues($this->_oIssueSetMock);
 }
 public function setUp()
 {
     parent::setUp();
     $pageData = array("id" => 1, "title" => "test_page", "revision" => 1, "user" => 1);
     $this->page = new AM_Model_Db_Page();
     $this->page->setFromArray($pageData);
     $this->page->save();
 }
 public function setUp()
 {
     parent::setUp();
     $this->_oStaticPdf = AM_Model_Db_Table_Abstract::factory('static_pdf')->findOneBy(array('id' => 1));
     $this->_oStandardMock = $this->getMock('AM_Tools_Standard', array('is_dir', 'mkdir'));
     $this->_oUploaderMock = $this->getMock('AM_Handler_Upload', array('isValid', 'isUploaded', 'getFileInfo', 'receive'));
     $this->_oThumbnailerMock = $this->getMock('AM_Handler_Thumbnail', array('addSourceFile', 'loadAllPresets', 'createThumbnails', 'getSources'));
     AM_Handler_Locator::getInstance()->setHandler('thumbnail', $this->_oThumbnailerMock);
 }
 public function setUp()
 {
     parent::setUp();
     $this->_oStandardMock = $this->getMock('AM_Tools_Standard', array('fwrite', 'fread', 'stream_select', 'stream_set_write_buffer', 'stream_set_blocking', 'stream_socket_client', 'stream_context_create', 'fclose', 'is_resource', 'is_readable'));
     $oConfig = Zend_Registry::get('config');
     //Create new apns configuration
     $aApnsProperties = array('environment' => 'sandbox', 'cerificate_path' => 'test_path');
     $this->_oConfig = new Zend_Config($oConfig->toArray(), true);
     $this->_oConfig->apns = $aApnsProperties;
     Zend_Registry::set('config', $this->_oConfig);
 }
 public function setUp()
 {
     parent::setUp();
     $this->_oPage = AM_Model_Db_Table_Abstract::factory('page')->findOneBy(array('id' => 1));
     $this->_oElementsMock = $this->getMock('AM_Model_Db_Rowset_Element', array('copyToPage'), array(array('readOnly' => true)));
     $this->_oPageBackgroundMock = $this->getMock('AM_Model_Db_PageBackground', array('copyToPage'), array(array('readOnly' => true, 'table' => new AM_Model_Db_Table_PageBackground())));
     $this->_oTermMock = $this->getMock('AM_Model_Db_Term', array('saveToPage'), array(array('readOnly' => true, 'table' => new AM_Model_Db_Table_PageBackground())));
     $this->_oPage->setElements($this->_oElementsMock);
     $this->_oPage->setPageBackground($this->_oPageBackgroundMock);
     $this->_oPage->addTerm($this->_oTermMock);
 }
 public function setUp()
 {
     parent::setUp();
     $revisionData = array("id" => 1, "title" => "test_revision", "state" => 1, "issue" => 1, "user" => 1);
     $this->revision = new AM_Model_Db_Revision();
     $this->revision->setFromArray($revisionData);
     $this->revision->save();
     $appData = array("id" => 1, "title" => "test_app1", "client" => 1);
     $this->app = new AM_Model_Db_Application(array("data" => $appData));
     $issueData = array("id" => 1, "title" => "test_issue1", "user" => 1);
     $issue = new AM_Model_Db_Issue(array("data" => $issueData));
     $this->revision->setApplication($this->app);
     $this->revision->setIssue($issue);
     $this->pageMock = $this->getMock('AM_Model_Db_Page', array('moveToRevision'), array(), '', false);
     $this->revision->setPages(array($this->pageMock));
 }
 public function setUp()
 {
     parent::setUp();
     $revisionData = array("id" => 1, "title" => "test_revision", "state" => 1, "issue" => 1, "user" => 1);
     $this->revision = new AM_Model_Db_Revision();
     $this->revision->setFromArray($revisionData);
     $this->revision->save();
     $appData = array("id" => 1, "title" => "test_app1", "client" => 1);
     $app = new AM_Model_Db_Application();
     $app->setFromArray($appData);
     $app->save();
     $issueData = array("id" => 1, "title" => "test_issue1", "application" => 1, "user" => 1);
     $issue = new AM_Model_Db_Issue();
     $issue->setFromArray($issueData);
     $issue->save();
     $this->revision->setApplication($app);
     $this->revision->setIssue($issue);
 }
 protected function tearDown()
 {
     parent::tearDown();
     Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session());
 }
 protected function setUp()
 {
     parent::setUp();
     $this->_prepareSqliteAdapter();
 }
Esempio n. 11
0
 protected function setUp()
 {
     parent::setUp();
 }
 protected function tearDown()
 {
     parent::tearDown();
     AM_Handler_Locator::getInstance()->setHandler('thumbnail', 'AM_Handler_Thumbnail');
 }