本文整理汇总了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);
}
示例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);
}
示例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]);
}
示例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');
}
示例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'];
}
示例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() . '/';
}
示例7: setUp
/**
* tests initialization
*/
public function setUp()
{
\common_ext_ExtensionsManager::singleton()->getExtensionById('taoTestTaker');
TaoPhpUnitTestRunner::initTest();
$this->subjectsService = TestTakerService::singleton();
$this->testCenterService = TestCenterService::singleton();
}
示例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();
}
示例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));
}
示例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');
}
示例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();
}
示例12: setUp
/**
* tests initialization
*/
public function setUp()
{
TaoPhpUnitTestRunner::initTest();
try {
$this->pdfBookletExporter = new PdfBookletExporter();
} catch (BookletExporterException $e) {
$this->markTestSkipped($e->getMessage());
}
}
示例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();
}
}
示例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();
}
示例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());
}