当前位置: 首页>>代码示例>>PHP>>正文


PHP elis::component_file方法代码示例

本文整理汇总了PHP中elis::component_file方法的典型用法代码示例。如果您正苦于以下问题:PHP elis::component_file方法的具体用法?PHP elis::component_file怎么用?PHP elis::component_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在elis的用法示例。


在下文中一共展示了elis::component_file方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_elis_tasks_get_cached

 /**
  * Validate scheduled tasks.
  */
 public function test_elis_tasks_get_cached()
 {
     $dataset = $this->createCsvDataSet(array('local_eliscore_sched_tasks' => elis::component_file('eliscore', 'tests/fixtures/elis_scheduled_tasks.csv')));
     $this->loadDataSet($dataset);
     $cachedtasks = elis_tasks_get_cached('elis_program');
     $this->assertNotEmpty($cachedtasks);
     $this->assertInternalType('array', $cachedtasks);
     $this->assertArrayHasKey('s:7:"pm_cron";', $cachedtasks);
     $this->assertNotEmpty($cachedtasks['s:7:"pm_cron";']);
     $this->assertInternalType('array', $cachedtasks['s:7:"pm_cron";']);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:14,代码来源:scheduled_tasks_test.php

示例2: test_elis_config

 /**
  * Validate ELIS config settings.
  */
 public function test_elis_config()
 {
     $dataset = $this->createCsvDataSet(array('config_plugins' => elis::component_file('eliscore', 'tests/fixtures/config_plugins.csv')));
     $this->loadDataSet($dataset);
     $elisconfig = new elis_config();
     $pluginconfig = $elisconfig->testplugin;
     $this->assertNotEmpty($pluginconfig);
     $this->assertInternalType('object', $pluginconfig);
     $this->assertObjectHasAttribute('testconfigkey', $pluginconfig);
     $this->assertEquals('testconfigvalue', $pluginconfig->testconfigkey);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:14,代码来源:setup_test.php

示例3: file

 /**
  * Return the full path name for a PM file.
  */
 static function file($file)
 {
     return elis::component_file('elisprogram', $file);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:7,代码来源:setup.php

示例4: test_duplicateusertrackdata

 /**
  * Test for duplicate usertrack records.
  */
 public function test_duplicateusertrackdata()
 {
     global $CFG, $DB;
     require_once elispm::lib('data/usertrack.class.php');
     $dataset = $this->createCsvDataSet(array(usertrack::TABLE => elis::component_file('elisprogram', 'tests/fixtures/usertrack_trackassignment_listing.csv')));
     $this->loadDataSet($dataset);
     // Drop the table index so that we can insert a duplicate record.
     $table = new xmldb_table(usertrack::TABLE);
     $index = new xmldb_index('userid_trackid_ix', XMLDB_INDEX_UNIQUE, array('userid', 'trackid'));
     $dbman = $DB->get_manager();
     if ($dbman->index_exists($table, $index)) {
         $dbman->drop_index($table, $index);
     }
     // Should not report any duplicates.
     $duplicatecheck = new duplicate_usertracks();
     $this->assertEquals(0, $duplicatecheck->count);
     // Insert a duplicate record.
     $record = new stdClass();
     $record->userid = 100;
     $record->trackid = 1;
     $DB->insert_record(usertrack::TABLE, $record);
     // Should report duplicates.
     $duplicatecheck = new duplicate_usertracks();
     $this->assertGreaterThan(0, $duplicatecheck->count);
     // Remove duplicate records.
     pm_fix_duplicate_usertrack_records();
     // Should not report any duplicates.
     $duplicatecheck = new duplicate_usertracks();
     $this->assertEquals(0, $duplicatecheck->count);
     // Put the index back.
     $dbman->add_index($table, $index);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:35,代码来源:health_check_test.php

示例5: load_userset_csv_data

 /**
  * Load test data from CSV file.
  */
 protected function load_userset_csv_data() {
     $dataset = $this->createCsvDataSet(array(
         userset::TABLE => elis::component_file('elisprogram', 'tests/fixtures/userset.csv')
     ));
     $this->loadDataSet($dataset);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:9,代码来源:reports_contexts_test.php

示例6: load_csv_data

 /**
  * Load custom profile field data from CSV.
  */
 protected function load_csv_data()
 {
     $dataset = $this->createCsvDataSet(array('user' => elis::component_file('elisprogram', 'tests/fixtures/mdluser.csv'), 'user_info_field' => elis::component_file('elisprogram', 'tests/fixtures/user_info_field.csv'), 'user_info_data' => elis::component_file('elisprogram', 'tests/fixtures/user_info_data.csv'), user::TABLE => elis::component_file('elisprogram', 'tests/fixtures/pmuser.csv'), usermoodle::TABLE => elis::component_file('elisprogram', 'tests/fixtures/usermoodle.csv'), field::TABLE => elis::component_file('elisprogram', 'tests/fixtures/user_field.csv'), field_owner::TABLE => elis::component_file('elisprogram', 'tests/fixtures/user_field_owner.csv'), userset::TABLE => elis::component_file('elisprogram', 'tests/fixtures/userset.csv')));
     $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);
     $dataset->addSubStrReplacement('\\n', "\n");
     $this->loadDataSet($dataset);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:10,代码来源:custom_field_permissions_test.php

示例7: test_validation_prevents_duplicates

 /**
  * Test validation of duplicates.
  *
  * @expectedException data_object_validation_exception
  * @uses $DB
  */
 public function test_validation_prevents_duplicates()
 {
     global $DB;
     $dataset = $this->createCsvDataSet(array('config' => elis::component_file('eliscore', 'tests/fixtures/phpunit_data_object_test.csv')));
     $this->loadDataSet($dataset);
     $config = new config_object(false, null, array(), false, array(), $DB);
     $config->name = 'foo';
     $config->value = 'foovalue';
     $config->save();
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:16,代码来源:data_object_test.php


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