當前位置: 首頁>>代碼示例>>PHP>>正文


PHP test\TaoPhpUnitTestRunner類代碼示例

本文整理匯總了PHP中oat\tao\test\TaoPhpUnitTestRunner的典型用法代碼示例。如果您正苦於以下問題:PHP TaoPhpUnitTestRunner類的具體用法?PHP TaoPhpUnitTestRunner怎麽用?PHP TaoPhpUnitTestRunner使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TaoPhpUnitTestRunner類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $oauthClass = new core_kernel_classes_Class(CLASS_OAUTH_CONSUMER);
     $resource = $oauthClass->createInstanceWithProperties(array(PROPERTY_OAUTH_KEY => 'test_key', PROPERTY_OAUTH_SECRET => md5(rand())));
     $this->oauthCustomer = new tao_models_classes_oauth_Credentials($resource);
 }
開發者ID:nagyist,項目名稱:extension-tao-lti,代碼行數:10,代碼來源:OauthTest.php

示例2: setUp

 /**
  * tests initialization
  * load registry service
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->registry = new CreatorRegistry();
     $packageValid = dirname(__FILE__) . '/samples/valid.zip';
     $this->registry->add($packageValid);
 }
開發者ID:nagyist,項目名稱:extension-tao-itemqti-pci,代碼行數:11,代碼來源:CreatorHookTest.php

示例3: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->userService = tao_models_classes_UserService::singleton();
     $this->testUserData[PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($this->testUserData[PROPERTY_USER_PASSWORD]);
     $this->testUserUtf8Data[PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($this->testUserUtf8Data[PROPERTY_USER_PASSWORD]);
 }
開發者ID:nagyist,項目名稱:tao-core,代碼行數:10,代碼來源:UserTest.php

示例4: setUp

 public function setUp()
 {
     \common_ext_ExtensionsManager::singleton()->getExtensionById('taoDelivery');
     TaoPhpUnitTestRunner::initTest();
     $this->service = ServiceManager::getServiceManager()->get(DeliveryMonitoringService::CONFIG_ID);
     $this->persistence = \common_persistence_Manager::getPersistence('default');
 }
開發者ID:oat-sa,項目名稱:extension-tao-proctoring,代碼行數:7,代碼來源:DeliveryMonitoringServiceTest.php

示例5: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->disableCache();
     // creates a user using remote script from joel
     $testUserData = array(PROPERTY_USER_LOGIN => 'tjdoe', PROPERTY_USER_PASSWORD => 'test123', PROPERTY_USER_LASTNAME => 'Doe', PROPERTY_USER_FIRSTNAME => 'John', PROPERTY_USER_MAIL => 'jdoe@tao.lu', PROPERTY_USER_DEFLG => \tao_models_classes_LanguageService::singleton()->getLanguageByCode(DEFAULT_LANG)->getUri(), PROPERTY_USER_UILG => \tao_models_classes_LanguageService::singleton()->getLanguageByCode(DEFAULT_LANG)->getUri(), PROPERTY_USER_ROLES => array(INSTANCE_ROLE_GLOBALMANAGER));
     $testUserData[PROPERTY_USER_PASSWORD] = 'test' . rand();
     $data = $testUserData;
     $data[PROPERTY_USER_PASSWORD] = \core_kernel_users_Service::getPasswordHash()->encrypt($data[PROPERTY_USER_PASSWORD]);
     $tmclass = new \core_kernel_classes_Class(CLASS_TAO_USER);
     $user = $tmclass->createInstanceWithProperties($data);
     \common_Logger::i('Created user ' . $user->getUri());
     // prepare a lookup table of languages and values
     $usage = new \core_kernel_classes_Resource(INSTANCE_LANGUAGE_USAGE_GUI);
     $propValue = new \core_kernel_classes_Property(RDF_VALUE);
     $langService = \tao_models_classes_LanguageService::singleton();
     $lookup = array();
     foreach ($langService->getAvailableLanguagesByUsage($usage) as $lang) {
         $lookup[$lang->getUri()] = (string) $lang->getUniquePropertyValue($propValue);
     }
     $data = array('rootUrl' => ROOT_URL, 'userUri' => $user->getUri(), 'userData' => $testUserData, 'lang' => $lookup);
     $this->login = $data['userData'][PROPERTY_USER_LOGIN];
     $this->password = $data['userData'][PROPERTY_USER_PASSWORD];
     $this->userUri = $data['userUri'];
 }
開發者ID:nagyist,項目名稱:tao-core,代碼行數:25,代碼來源:RestTestCase.php

示例6: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->testService = taoQtiTest_models_classes_QtiTestService::singleton();
     $this->dataDir = dirname(__FILE__) . '/data/';
     $this->outputDir = sys_get_temp_dir() . '/';
 }
開發者ID:oat-sa,項目名稱:extension-tao-testqti,代碼行數:7,代碼來源:QtiTestExporterTest.php

示例7: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     \common_ext_ExtensionsManager::singleton()->getExtensionById('taoTestTaker');
     TaoPhpUnitTestRunner::initTest();
     $this->subjectsService = TestTakerService::singleton();
     $this->testCenterService = TestCenterService::singleton();
 }
開發者ID:nagyist,項目名稱:extension-tao-testcenter,代碼行數:10,代碼來源:TestCenterServiceTest.php

示例8: setUp

 /**
  * initialize a test method
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $activityExecutionClass = new core_kernel_classes_Class(CLASS_ACTIVITY_EXECUTION);
     $this->activityExecution = $activityExecutionClass->createInstance('test');
     $this->service = wfEngine_models_classes_RecoveryService::singleton();
 }
開發者ID:nagyist,項目名稱:extension-tao-wfengine,代碼行數:10,代碼來源:RecoveryServiceTest.php

示例9: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->testRunnerService = $this->getMockBuilder('oat\\taoTestLinear\\model\\TestRunnerService')->disableOriginalConstructor()->setMethods(array('getItemData', 'getPrevious'))->getMock();
     $ref = new \ReflectionProperty('tao_models_classes_Service', 'instances');
     $ref->setAccessible(true);
     $ref->setValue(null, array('oat\\taoTestLinear\\model\\TestRunnerService' => $this->testRunnerService));
 }
開發者ID:oat-sa,項目名稱:extension-tao-testlinear,代碼行數:8,代碼來源:TestExecutionStateTest.php

示例10: setUp

 public function setUp()
 {
     common_ext_ExtensionsManager::singleton()->getExtensionById('taoWfTest');
     // loads the extension
     TaoPhpUnitTestRunner::initTest();
     $this->service = taoWfTest_models_classes_WfTestService::singleton();
     $this->test = $this->service->createInstance($this->service->getRootclass(), 'taoWfTestUnitCompilerTest');
 }
開發者ID:nagyist,項目名稱:extension-tao-testwf,代碼行數:8,代碼來源:WfTestCompilerTest.php

示例11: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     common_ext_ExtensionsManager::singleton()->getExtensionById('taoWfTest');
     // loads the extension
     TaoPhpUnitTestRunner::initTest();
     $this->wftService = taoWfTest_models_classes_WfTestService::singleton();
     $this->wfModel = new taoWfTest_models_classes_WfTestModel();
 }
開發者ID:nagyist,項目名稱:extension-tao-testwf,代碼行數:11,代碼來源:WfTestModelTest.php

示例12: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     try {
         $this->pdfBookletExporter = new PdfBookletExporter();
     } catch (BookletExporterException $e) {
         $this->markTestSkipped($e->getMessage());
     }
 }
開發者ID:nagyist,項目名稱:extension-tao-booklet,代碼行數:12,代碼來源:PdfBookletExporterTest.php

示例13: setUp

 /**
  * initialize a test method
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     error_reporting(E_ALL);
     $this->userPassword = '123456';
     if (is_null($this->userService)) {
         $this->userService = wfEngine_models_classes_UserService::singleton();
     }
 }
開發者ID:nagyist,項目名稱:extension-tao-wfengine,代碼行數:12,代碼來源:wfEngineServiceTest.php

示例14: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->service = TestRunnerService::singleton();
     $this->storageMock = $this->getMockBuilder('tao_models_classes_service_FileStorage')->disableOriginalConstructor()->setMethods(array('getDirectoryById'))->getMock();
     $ref = new \ReflectionProperty('tao_models_classes_service_FileStorage', 'instance');
     $ref->setAccessible(true);
     $ref->setValue(null, $this->storageMock);
     $this->directoryMock = $this->getMockBuilder('tao_models_classes_service_StorageDirectory')->disableOriginalConstructor()->setMethods(array('getPath'))->getMock();
 }
開發者ID:oat-sa,項目名稱:extension-tao-testlinear,代碼行數:10,代碼來源:TestRunnerServiceTest.php

示例15: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->test = new \core_kernel_classes_Resource('http://myFancyDomain.com/myGreatResourceUriForTest');
     $this->item = new \core_kernel_classes_Resource('http://myFancyDomain.com/myGreatResourceUriForItem');
     $this->item->setPropertyValue(new \core_kernel_classes_Property('http://www.tao.lu/Ontologies/TAOItem.rdf#ItemModel'), 'http://www.tao.lu/Ontologies/TAOItem.rdf#QTI');
     $this->testModel = new TestModel();
     $this->storage = new \taoDelivery_models_classes_TrackedStorage();
     $this->testModel->save($this->test, array());
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:10,代碼來源:TestCompilerTest.php


注:本文中的oat\tao\test\TaoPhpUnitTestRunner類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。