• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP test\TaoPhpUnitTestRunner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中oat\tao\test\TaoPhpUnitTestRunner的典型用法代码示例。如果您正苦于以下问题:PHP TaoPhpUnitTestRunner类的具体用法?PHP TaoPhpUnitTestRunner怎么用?PHP TaoPhpUnitTestRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TaoPhpUnitTestRunner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 => '[email protected]', 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


示例16: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $processDefinitionClass = new core_kernel_classes_Class(CLASS_PROCESS);
     $processDefinition = $processDefinitionClass->createInstance('process of Checker UnitTest', 'created for the unit test of process cloner');
     if ($processDefinition instanceof core_kernel_classes_Resource) {
         $this->proc = $processDefinition;
     }
     $this->authoringService = wfAuthoring_models_classes_ProcessService::singleton();
 }
开发者ID:oat-sa,项目名称:extension-tao-wfauthoring,代码行数:13,代码来源:ProcessCheckerTest.php


示例17: setUp

 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->testModel = new TestModel();
     $this->uri = "MyGreatTestUri#123";
     $this->test = new \core_kernel_classes_Resource($this->uri);
     if (!file_exists(sys_get_temp_dir() . '/sample/')) {
         mkdir(sys_get_temp_dir() . '/sample/');
     }
 }
开发者ID:swapnilaptara,项目名称:tao-aptara-assess,代码行数:10,代码来源:TestModelTest.php


示例18: setUp

 public function setUp()
 {
     \common_ext_ExtensionsManager::singleton()->getExtensionById('taoDelivery');
     TaoPhpUnitTestRunner::initTest();
     $service = ServiceManager::getServiceManager()->get(MonitorCacheService::CONFIG_ID);
     $this->service = new MonitorCacheService($service->getOptions());
     $this->persistence = \common_persistence_Manager::getPersistence('default');
     if (!extension_loaded('pthreads')) {
         $this->markTestSkipped('Pthreads extension is not available.');
     }
 }
开发者ID:oat-sa,项目名称:extension-tao-proctoring,代码行数:11,代码来源:MonitorCacheServiceTest.php


示例19: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->campaignService = taoCampaign_models_classes_CampaignService::singleton();
     $rootClass = new core_kernel_classes_Class(TAO_DELIVERY_CAMPAIGN_CLASS);
     $this->campaignClass = $this->campaignService->createCampaignClass($rootClass, "My Campaign Class");
     $this->campaign = $this->campaignClass->createInstance("MyCampaign");
     $deliveryClass = new core_kernel_classes_Class(TAO_DELIVERY_CLASS);
     $this->delivery = $deliveryClass->createInstance("MyDelivery");
     $this->campaignService->setRelatedDeliveries($this->campaign, array($this->delivery->getUri()));
 }
开发者ID:nagyist,项目名称:extension-tao-campaign,代码行数:14,代码来源:CampaignTest.php


示例20: setUp

 /**
  * tests initialization
  */
 public function setUp()
 {
     TaoPhpUnitTestRunner::initTest();
     $this->clearPassword = $this->testUserData[PROPERTY_USER_PASSWORD];
     $this->testUserData[PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($this->testUserData[PROPERTY_USER_PASSWORD]);
     $this->userService = tao_models_classes_UserService::singleton();
     $class = new core_kernel_classes_Class(CLASS_GENERIS_USER);
     $this->testUser = $class->createInstance();
     $this->assertNotNull($this->testUser);
     $this->userService->bindProperties($this->testUser, $this->testUserData);
 }
开发者ID:nagyist,项目名称:tao-core,代码行数:14,代码来源:AuthTest.php



注:本文中的oat\tao\test\TaoPhpUnitTestRunner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Service\AbstractService类代码示例发布时间:2022-05-23
下一篇:
PHP service\ServiceManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap