本文整理汇总了PHP中PHPUnit_Extensions_Database_DataSet_CsvDataSet::getTable方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_DataSet_CsvDataSet::getTable方法的具体用法?PHP PHPUnit_Extensions_Database_DataSet_CsvDataSet::getTable怎么用?PHP PHPUnit_Extensions_Database_DataSet_CsvDataSet::getTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Extensions_Database_DataSet_CsvDataSet
的用法示例。
在下文中一共展示了PHPUnit_Extensions_Database_DataSet_CsvDataSet::getTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toPhpUnitTable
/**
* @return \PHPUnit_Extensions_Database_DataSet_ITable
*/
public function toPhpUnitTable()
{
$dataSet = new \PHPUnit_Extensions_Database_DataSet_CsvDataSet();
$dataSet->addTable($this->getTable()->getFullName(), $this->getTable()->getDataPath());
return $dataSet->getTable($this->getTable()->getFullName());
}
示例2: test_deleterecordcandeleteusersubsets
/**
* Test that you can delete a user set and all its user subsets
*/
public function test_deleterecordcandeleteusersubsets()
{
global $DB;
$this->load_csv_data();
accesslib_clear_all_caches(true);
// Make sure all the contexts are created, so that we can find the children.
for ($i = 1; $i <= 4; $i++) {
$clustercontextinstance = \local_elisprogram\context\userset::instance($i);
}
// Delete a record.
$src = new userset(2, null, array(), false, array());
$src->deletesubs = true;
$src->delete();
// Read it back.
$recordset = $DB->get_recordset(userset::TABLE, null, '', 'name,display,parent,depth,id');
$result = new moodle_recordset_phpunit_datatable(userset::TABLE, $recordset);
$dataset = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();
$dataset->addTable(userset::TABLE, elispm::file('tests/fixtures/userset_delete_subset_b_test_result.csv'));
$this->assertTablesEqual($dataset->getTable(userset::TABLE), $result);
}