public function setUp() { parent::setUp(); $this->_validator = new Application_Form_Validate_AtLeastOneNotEmpty(); $this->_validator->addElement('name'); $this->_validator->addElement('number'); }
public function setUp() { parent::setUp(); $db = Zend_Registry::get('db'); $this->projectMapper = new C3op_Projects_ProjectMapper($db); $this->projectsBeforeTests = $this->projectMapper->getAllIds(); }
/** Initialize tests */ public function setUp() { $this->enabledModules = array('javauploaddownload'); $this->_daos = array('Item'); $this->_models = array('Item', 'User'); parent::setUp(); }
/** init tests */ public function setUp() { $this->setupDatabase(array('default')); $this->_models = array('Community', 'User', 'Folder', 'Item', 'Folderpolicyuser', 'Itempolicyuser'); $this->_daos = array(); parent::setUp(); }
public function setUp() { parent::setUp(); $this->_gateway = new Users_Model_UserGateway(); $this->_installModule('pages'); $this->_installModule('users'); }
public function setUp() { parent::setUp(); $this->emptyCollectionRole = new Opus_CollectionRole(); $this->emptyCollectionRole->setName("test1role"); $this->emptyCollectionRole->setOaiName("test1role"); $this->emptyCollectionRole->setDisplayBrowsing("Name"); $this->emptyCollectionRole->setDisplayFrontdoor("Name"); $this->emptyCollectionRole->setDisplayOai("Name"); $this->emptyCollectionRole->setPosition(100); $this->emptyCollectionRole->store(); $this->nonEmptyCollectionRole = new Opus_CollectionRole(); $this->nonEmptyCollectionRole->setName("test2role"); $this->nonEmptyCollectionRole->setOaiName("test2role"); $this->nonEmptyCollectionRole->setDisplayBrowsing("Name"); $this->nonEmptyCollectionRole->setDisplayFrontdoor("Name"); $this->nonEmptyCollectionRole->setDisplayOai("Name"); $this->nonEmptyCollectionRole->setPosition(101); $this->nonEmptyCollectionRole->store(); $this->rootCollection = $this->nonEmptyCollectionRole->addRootCollection(); $this->rootCollection->store(); $this->collection = new Opus_Collection(); $this->collection->setName("first collection"); $this->collection->setNumber("123"); $this->rootCollection->addFirstChild($this->collection); $this->collection->store(); $this->anotherCollection = new Opus_Collection(); $this->anotherCollection->setName("last collection"); $this->anotherCollection->setNumber("987"); $this->rootCollection->addLastChild($this->anotherCollection); $this->anotherCollection->store(); }
/** set up tests */ public function setUp() { $this->setupDatabase(array('default', 'adminUser')); $this->_models = array('User', 'Item'); $this->enabledModules = array('scheduler', 'remoteprocessing', 'api'); parent::setUp(); }
function setUp() { parent::setUp(); $this->path = APPLICATION_PATH . "/../tests/fixtures/quiz1"; $this->getFrontController()->setParam('xml_path', $this->path); //Override for our tests }
/** init tests */ public function setUp() { $this->setupDatabase(array('default')); $this->_models = array('User', 'Community', 'Group', 'Feed', 'NewUserInvitation', 'PendingUser'); $this->_daos = array('User'); parent::setUp(); }
public function setUp() { parent::setUp(); $this->Admin = ClassRegistry::init('Admin'); $this->UsersController = new UsersController(); $this->UsersController->constructClasses(); }
public function setUp() { PHPUnit_Framework_Error_Notice::$enabled = FALSE; parent::setUp(); $this->ProductCredit = ClassRegistry::init('ProductCredit'); //$this->OrdersController->startup($this->Controller); }
public function setUp() { parent::setUp(); $this->helper = Zend_Controller_Action_HelperBroker::getStaticHelper('breadcrumbs'); $this->navigation = Zend_Registry::get('Opus_View')->navigation(); $this->helper->setNavigation($this->navigation); }
/** * startTest method * * @return void */ public function setUp() { parent::setUp(); // reset variables require dirname(dirname(dirname(dirname(dirname(__FILE__))))) . DS . 'Lil' . DS . 'Config' . DS . 'core.php'; Configure::write('Lil.plugins', array('Crm', 'Invoices')); }
public function setUp() { parent::setUp(); $this->test = new BowlingGameController(new BowlingGame()); $this->setupLayout($this->test); $this->layout = $this->getLayout($this->test); }
public function setUp() { parent::setUp(); $this->model = new Admin_Model_FileImport(); $this->importFolder = APPLICATION_PATH . '/tests/workspace/incoming'; $this->_clearImportFolder(); }
public function setUp() { parent::setUp(); $this->_model = Application_Model_Factory::getModel($this->_targetServer); $this->_adapter = new Zend_Http_Client_Adapter_Test(); $this->_model->getHttpClient()->setAdapter($this->_adapter); }
/** init tests */ public function setUp() { $this->setupDatabase(array('default')); $this->_models = array('Assetstore', 'Bitstream', 'User'); $this->_daos = array('Assetstore', 'User'); parent::setUp(); $this->loadUsers(); // create another assetstore $testAssetstoreBase = $this->getTempDirectory() . '/test/'; $testAssetstoreBase = str_replace('tests/../', '', $testAssetstoreBase); $testAssetstoreBase = str_replace('//', '/', $testAssetstoreBase); $testAssetstore2 = $testAssetstoreBase . '/assetstore2'; if (!is_dir($testAssetstore2)) { mkdir($testAssetstore2); } $testAssetstoreAdditionalPath = $testAssetstoreBase . '/additionalpathassetstore2'; if (!is_dir($testAssetstoreAdditionalPath)) { mkdir($testAssetstoreAdditionalPath); } $this->testAssetstoreAdditionalPath = $testAssetstoreAdditionalPath; $testAssetstoreDao = new AssetstoreDao(); $testAssetstoreDao->setName('testassetstore2'); $testAssetstoreDao->setPath($testAssetstore2); $testAssetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL); $this->Assetstore->save($testAssetstoreDao); $this->testAssetstoreDao = $testAssetstoreDao; }
public function setUp() { parent::setUp(); $this->Migrates = $this->generate('MktMigrate.Migrates', array('models' => array(), 'components' => array('Session', 'RequestHandler', 'Auth'), 'helpers' => array('ScriptCombiner'))); $_SERVER['PHP_AUTH_USER'] = Configure::read('MktMigrate.login'); $_SERVER['PHP_AUTH_PW'] = Configure::read('MktMigrate.pass'); }
public function setUp() { parent::setUp(); $this->_db = Zend_Registry::get('db'); $this->_str = 'notes @content 12:01 dfsa 1:00 df 10:01 badtime12:01 num1234'; $this->_input = new Lds_Helper_MainInput($this->_str); }
/** init tests */ public function setUp() { $this->setupDatabase(array('default')); $this->_models = array('User'); $this->_daos = array('User'); parent::setUp(); }
/** * setUp * * @author Jun Nishikawa <*****@*****.**> * @return void */ public function setUp() { Configure::write('debug', 0); parent::setUp(); $this->InstallController = $this->generate('Install.Install', array('components' => array('Session'))); $this->controller->plugin = 'Install'; }
/** Setup. */ public function setUp() { $this->enabledModules = array('api', 'scheduler', $this->moduleName); $this->_models = array('Assetstore', 'Community', 'Setting', 'User'); $this->setupDatabase(array('default')); ControllerTestCase::setUp(); }
public function setUp() { parent::setUp(); $this->test = new DashboardController(); $this->setupLayout($this->test); $this->layout = $this->getLayout($this->test); }
/** * Set up environment * */ public function setUp() { parent::setUp(); $uid = date('Y-m-d-H:i:s'); $this->_data = array('pid' => 123, 'title' => 'Test: ' . $uid, 'alias' => 'test-' . $uid, 'content' => '<h2>Test</h2><p>Content, content, content</p>', 'userId' => 1); $this->_pageTable = new Pages_Model_Page_Table(); }
/** set up tests */ public function setUp() { $this->setupDatabase(array('default')); $this->_models = array('User', 'Item', 'Bitstream'); $this->_components = array('Export', 'Upload'); parent::setUp(); }
public function setUp() { parent::setUp(); $this->Course = ClassRegistry::init('Course'); $this->controller = $this->generate('Courses', array('components' => array('Auth' => array('user'), 'Session' => array('read')))); $this->controller->Session->expects($this->any())->method('read')->will($this->returnValue(array('review' => true))); }
public function setUp() { parent::setUp(); $this->Person = ClassRegistry::init('Person'); $this->controller = $this->generate('Person', array('components' => array('Session' => array('read'), 'Auth' => array('user')))); $this->controller->Auth->staticExpects($this->any())->method('user')->will($this->returnValue(get_object_vars(json_decode('{"username":"******","restOfName":"Taylor Lee","surname":"Thomas","memberOf":"aagt,aerstd,apemp,alumni,agt,netfse,constd,ESENG,ENTERPRISE DIRECTORY,FORMER STD--24 COMPLETED HRS,FULL TIME STUDENT JUNIOR,OIT_EDGE_SERVICES,oit04,QUALIFIED-FOR-LABS,QUALIFIED-FOR-ED2,RATINGS_ADMIN,RATINGS_PROXY,RR,SDADMIN,vserv,eroom-oit","preferredFirstName":"Taylor","sortName":"Thomas, Taylor Lee","name":"Taylor Thomas","preferredSurname":"Thomas","netId":"tthomas8","fullName":"Taylor Lee Thomas"}')))); }
public function setUp() { parent::setUp(); $spreadsheetPersistence = new ZC_SpreadsheetAdapter($this->testuser, $this->testpass, $this->spreadsheetKey); $geocodingService = new ZC_GeocodingAdapter(''); $this->personMapper = new ZC_PersonMapper($geocodingService, $spreadsheetPersistence); }
/** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->_restore = Configure::read('UniLogin.testProvider'); Configure::write('UniLogin.testProvider.defaultRedirectUrl', 'http://www.example.com/redirectUrl'); Configure::write('UniLogin.testProvider.applicationId', 'myApplicationId'); }
public function setUp() { parent::setUp(); $this->test = new DiamondController(new Diamond()); $this->setupLayout($this->test); $this->layout = $this->getLayout($this->test); }