当前位置: 首页>>代码示例>>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;未经允许,请勿转载。