示例#1
0
 public function setUp()
 {
     parent::setUp();
     TaoPhpUnitTestRunner::initTest();
     $class = new core_kernel_classes_Class(CLASS_OAUTH_CONSUMER);
     $this->credentials = $class->createInstanceWithProperties(array(RDFS_LABEL => 'test_credentials', PROPERTY_OAUTH_KEY => 'testcase_12345', PROPERTY_OAUTH_SECRET => 'secret_12345'));
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     TaoPhpUnitTestRunner::initTest();
     $rdfClass = new core_kernel_classes_Class(CLASS_GENERIS_RESOURCE);
     $this->class = $rdfClass->createSubClass('test class');
     $this->property = $this->class->createProperty('test property');
 }
 public function setUp()
 {
     parent::setUp();
     // Save installation original mapping for restitution in tearDown.
     @mkdir($this->getBasePath());
     $this->setRegistry(new SharedLibrariesRegistry($this->getBasePath(), $this->getBaseUrl()));
     $this->initialMapping = $this->getClientLibRegistryMap();
 }
示例#4
0
 protected function setUp()
 {
     $this->disableCache();
     $pass = md5(rand());
     $taoManagerRole = new core_kernel_classes_Resource(INSTANCE_ROLE_BACKOFFICE);
     $this->testUser = tao_models_classes_UserService::singleton()->addUser('testUser', $pass, $taoManagerRole);
     $this->credentials = array('loginForm_sent' => 1, 'login' => 'testUser', 'password' => $pass);
     $this->assertIsA($this->testUser, 'core_kernel_classes_Resource');
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $userService = tao_models_classes_UserService::singleton();
     $roleService = tao_models_classes_RoleService::singleton();
     $baseRole = new core_kernel_classes_Resource(INSTANCE_ROLE_BACKOFFICE);
     $this->testRole = $roleService->addRole('testrole', $baseRole);
     $this->user = $userService->addUser('testcase', 'testcase');
     $userService->attachRole($this->user, $this->testRole);
 }
 public function setUp()
 {
     parent::setUp();
     $ext = common_ext_ExtensionsManager::singleton()->getExtensionById('taoQtiItem');
     $initialMapping = $ext->getConfig($this->getConfigId());
     // Save installation original mapping for restitution in tearDown.
     $this->setInitialMapping(is_array($initialMapping) ? $initialMapping : array());
     $ext->setConfig($this->getConfigId(), array());
     @mkdir($this->getBasePath());
     $this->setRegistry(new SharedLibrariesRegistry($this->getBasePath(), $this->getBaseUrl()));
 }
 public function setUp()
 {
     parent::setUp();
     $this->service = PlatformThemingService::singleton();
     // Save current Theming config...
     $this->tempConfig = $this->service->retrieveThemingConfig();
     // Set up all tests with an empty Theming Configuration.
     $this->service->syncThemingConfig(new PlatformThemingConfig());
     // Deal with data storage.
     $testFile = rtrim(sys_get_temp_dir(), "\\/") . '/tmp-platformthemingtest.txt';
     file_put_contents($testFile, 'data');
 }
示例#8
0
 public function setUp()
 {
     parent::setUp();
     TaoPhpUnitTestRunner::initTest();
 }
示例#9
0
 public function setUp()
 {
     parent::setUp();
 }
示例#10
0
 public function setUp()
 {
     parent::setUp();
     TaoPhpUnitTestRunner::initTest();
     $this->initEnv($this->tmpPath, $this->envName, $this->deep, $this->fileCount);
 }
示例#11
0
 protected function setUp()
 {
     parent::setUp();
     $this->factory = new Factory();
 }
 protected function setUp()
 {
     parent::setUp();
     // load constants
     \common_ext_ExtensionsManager::singleton()->getExtensionById('taoDelivery');
 }
示例#13
0
 protected function setUp()
 {
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $this->imsManifestExtractor = new ImsManifestMetadataExtractor();
 }
示例#15
0
 public function setUp()
 {
     parent::setUp();
     common_session_SessionManager::startSession(new \common_test_TestUserSession());
 }
 public function setUp()
 {
     parent::setUp();
     common_ext_ExtensionsManager::singleton()->getExtensionById('taoItems');
 }