本文整理汇总了PHP中oat\tao\test\TaoPhpUnitTestRunner::initTest方法的典型用法代码示例。如果您正苦于以下问题:PHP TaoPhpUnitTestRunner::initTest方法的具体用法?PHP TaoPhpUnitTestRunner::initTest怎么用?PHP TaoPhpUnitTestRunner::initTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oat\tao\test\TaoPhpUnitTestRunner
的用法示例。
在下文中一共展示了TaoPhpUnitTestRunner::initTest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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');
}
示例4: 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'];
}
示例5: setUp
public function setUp()
{
TaoPhpUnitTestRunner::initTest();
$this->testService = taoQtiTest_models_classes_QtiTestService::singleton();
$this->dataDir = dirname(__FILE__) . '/data/';
$this->outputDir = sys_get_temp_dir() . '/';
}
示例6: setUp
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'));
}
示例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
/**
* 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]);
}
示例9: 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();
}
示例10: 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));
}
示例11: 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');
}
示例12: 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();
}
示例13: setUp
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');
}
示例14: 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();
}
}
示例15: setUp
/**
* tests initialization
*/
public function setUp()
{
TaoPhpUnitTestRunner::initTest();
try {
$this->pdfBookletExporter = new PdfBookletExporter();
} catch (BookletExporterException $e) {
$this->markTestSkipped($e->getMessage());
}
}