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


PHP PHPUnit_Extensions_Database_DataSet_CsvDataSet类代码示例

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


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

示例1: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  PHPUnit_Extensions_Database_DataSet_CsvDataSet
  *
  * @since   3.1
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_menu', JPATH_TEST_DATABASE . '/jos_menu.csv');
     $dataSet->addTable('jos_menu_types', JPATH_TEST_DATABASE . '/jos_menu_types.csv');
     return $dataSet;
 }
开发者ID:sural98,项目名称:joomla-cms,代码行数:14,代码来源:JHtmlMenuTest.php

示例2: getCsvDataSet

 private function getCsvDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();
     $dataSet->addTable("class", D_DIR . 'class.csv');
     $dataSet->addTable("user", D_DIR . 'user.csv');
     $dataSet->addTable("address", D_DIR . 'address.csv');
     return $dataSet;
 }
开发者ID:p-ja,项目名称:phpunit-examples,代码行数:8,代码来源:57DBTest.php

示例3: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  PHPUnit_Extensions_Database_DataSet_CsvDataSet
  *
  * @since   3.2
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_users', JPATH_TEST_DATABASE . '/jos_users.csv');
     $dataSet->addTable('jos_content', JPATH_TEST_DATABASE . '/jos_content.csv');
     //$dataSet->addTable('jos_ucm_base', JPATH_TEST_DATABASE . '/jos_ucm_history.csv');
     return $dataSet;
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:15,代码来源:JHelperContenthistoryTest.php

示例4: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  PHPUnit_Extensions_Database_DataSet_CsvDataSet
  *
  * @since   3.1
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_extensions', JPATH_TEST_DATABASE . '/jos_extensions.csv');
     $dataSet->addTable('jos_finder_terms_common', JPATH_TEST_DATABASE . '/jos_finder_terms_common.csv');
     $dataSet->addTable('jos_finder_types', JPATH_TEST_DATABASE . '/jos_finder_types.csv');
     return $dataSet;
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:15,代码来源:FinderIndexerHelperTest.php

示例5: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  CSV database tables
  *
  * @since   11.4
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_assets', dirname(__DIR__) . '/stubs/jos_assets.csv');
     $dataSet->addTable('jos_categories', dirname(__DIR__) . '/stubs/jos_categories.csv');
     $dataSet->addTable('jos_content', dirname(__DIR__) . '/stubs/jos_content.csv');
     return $dataSet;
 }
开发者ID:raquelsa,项目名称:Joomla,代码行数:15,代码来源:JTableContentTest.php

示例6: getDataSet

	/**
	 * Gets the data set to be loaded into the database during setup
	 *
	 * @return  CSV database tables
	 *
	 * @since   11.4
	 */
	protected function getDataSet()
	{
		$dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');

		$dataSet->addTable('jos_extensions', __DIR__ . '/stubs/jos_extensions.csv');

		return $dataSet;
	}
开发者ID:robschley,项目名称:joomla-platform,代码行数:15,代码来源:JTableExtensionTest.php

示例7: getDataSet

 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_categories', JPATH_TESTS . '/stubs/jos_categories.csv');
     $dataSet->addTable('jos_assets', JPATH_TESTS . '/stubs/jos_assets.csv');
     $dataSet->addTable('jos_menu', JPATH_TESTS . '/stubs/jos_menu.csv');
     return $dataSet;
 }
开发者ID:GMaup,项目名称:joomla-platform,代码行数:8,代码来源:JTableNestedTest.php

示例8: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  PHPUnit_Extensions_Database_DataSet_CsvDataSet
  *
  * @since   12.2
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_users', JPATH_TEST_DATABASE . '/jos_users.csv');
     $dataSet->addTable('jos_user_usergroup_map', JPATH_TEST_DATABASE . '/jos_user_usergroup_map.csv');
     $dataSet->addTable('jos_usergroups', JPATH_TEST_DATABASE . '/jos_usergroups.csv');
     return $dataSet;
 }
开发者ID:sural98,项目名称:joomla-cms,代码行数:15,代码来源:JUserHelperTest.php

示例9: getDataSet

 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();
     $dataSet->addTable('post', 'csv/post.csv');
     $dataSet->addTable('post_comment', 'csv/post_comment.csv');
     $dataSet->addTable('current_visitors', 'csv/current_visitors.csv');
     return $dataSet;
 }
开发者ID:ralf000,项目名称:PHP4,代码行数:8,代码来源:unittest-9-csv.php

示例10: getDataSet

 protected function getDataSet()
 {
     $dataset = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(';', "'");
     $dataset->addTable('polling_messages', dirname(__FILE__) . '/fixtures/polling_messages.csv');
     $dataset->addTable('polling_users', dirname(__FILE__) . '/fixtures/polling_users.csv');
     $dataset->addTable('sessions', dirname(__FILE__) . '/fixtures/sessions.csv');
     return $dataset;
 }
开发者ID:jakob-stoeck,项目名称:os_poker,代码行数:8,代码来源:memoryUsageTest.php

示例11: getDataSet

 /**
  * Gets the data set to be loaded into the database during setup
  *
  * @return  CSV database tables
  *
  * @since   11.4
  */
 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $stubpath = JPATH_TESTS . '/suites/unit/joomla/table/stubs';
     $dataSet->addTable('jos_assets', $stubpath . '/jos_assets.csv');
     $dataSet->addTable('jos_categories', $stubpath . '/jos_categories.csv');
     $dataSet->addTable('jos_content', __DIR__ . '/stubs/jos_content.csv');
     return $dataSet;
 }
开发者ID:nogsus,项目名称:joomla-platform,代码行数:16,代码来源:JTableContentTest.php

示例12: getDataSet

 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $refreshTestNames = array('testGetPath', 'testMove', 'testMoveByReference', 'testDelete', 'testStore', 'testGetRootId', 'testOrderUp', 'testRebuild', 'testRebuildPath', 'testSaveorder');
     if (in_array($this->name, $refreshTestNames)) {
         $dataSet->addTable('jos_categories', JPATH_BASE . '/tests/unit/stubs/jos_categories.csv');
         $dataSet->addTable('jos_assets', JPATH_BASE . '/tests/unit/stubs/jos_assets.csv');
         $dataSet->addTable('jos_menu', JPATH_BASE . '/tests/unit/stubs/jos_menu.csv');
     }
     return $dataSet;
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:11,代码来源:JTableNestedTest.php

示例13: testCSVDataSet

    public function testCSVDataSet()
    {
        $table1MetaData = new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData('table1', array('table1_id', 'column1', 'column2', 'column3', 'column4'));
        $table2MetaData = new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData('table2', array('table2_id', 'column5', 'column6', 'column7', 'column8'));
        $table1 = new PHPUnit_Extensions_Database_DataSet_DefaultTable($table1MetaData);
        $table2 = new PHPUnit_Extensions_Database_DataSet_DefaultTable($table2MetaData);
        $table1->addRow(array('table1_id' => 1, 'column1' => 'tgfahgasdf', 'column2' => 200, 'column3' => 34.64, 'column4' => 'yghkf;a  hahfg8ja h;'));
        $table1->addRow(array('table1_id' => 2, 'column1' => 'hk;afg', 'column2' => 654, 'column3' => 46.54, 'column4' => '24rwehhads'));
        $table1->addRow(array('table1_id' => 3, 'column1' => 'ha;gyt', 'column2' => 462, 'column3' => 1654.4, 'column4' => 'asfgklg'));
        $table2->addRow(array('table2_id' => 1, 'column5' => 'fhah', 'column6' => 456, 'column7' => 46.5, 'column8' => 'fsdb, ghfdas'));
        $table2->addRow(array('table2_id' => 2, 'column5' => 'asdhfoih', 'column6' => 654, 'column7' => 'blah', 'column8' => '43asd "fhgj" sfadh'));
        $table2->addRow(array('table2_id' => 3, 'column5' => 'ajsdlkfguitah', 'column6' => 654, 'column7' => 'blah', 'column8' => 'thesethasdl 
asdflkjsadf asdfsadfhl "adsf, halsdf" sadfhlasdf'));
        $expectedDataSet = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet(array($table1, $table2));
        $csvDataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();
        $csvDataSet->addTable('table1', dirname(__FILE__) . '/../_files/CsvDataSets/table1.csv');
        $csvDataSet->addTable('table2', dirname(__FILE__) . '/../_files/CsvDataSets/table2.csv');
        PHPUnit_Extensions_Database_TestCase::assertDataSetsEqual($expectedDataSet, $csvDataSet);
    }
开发者ID:swk,项目名称:bluebox,代码行数:19,代码来源:CsvDataSetTest.php

示例14: getDataSet

 protected function getDataSet()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_CsvDataSet(',', "'", '\\');
     $dataSet->addTable('jos_assets', JPATH_BASE . '/tests/unit/stubs/jos_assets.csv');
     $dataSet->addTable('jos_categories', JPATH_BASE . '/tests/unit/stubs/jos_categories.csv');
     $dataSet->addTable('jos_usergroups', JPATH_BASE . '/tests/unit/stubs/jos_usergroups.csv');
     $dataSet->addTable('jos_user_usergroup_map', JPATH_BASE . '/tests/unit/stubs/jos_user_usergroup_map.csv');
     $dataSet->addTable('jos_users', JPATH_BASE . '/tests/unit/stubs/jos_users.csv');
     return $dataSet;
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:10,代码来源:JUserTestGetAuthorisedCategories.php

示例15: loadDatasetFile

 public function loadDatasetFile($filename, $format = '')
 {
     if ($format == '') {
         // try to deduce format from filename/extension
         $info = pathinfo($filename);
         $format = $info['extension'];
         if (substr($filename, -9, 9) == '.flat.xml') {
             $format = 'flatxml';
         }
     }
     if ($format == '') {
         // absolute default
         $format = 'yaml';
     }
     switch ($format) {
         case "flatxml":
             $ds = new \PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet($filename);
             break;
         case "csv":
             if ($this->tablename == '') {
                 throw new \InvalidArgumentException('You need to specify a tablename for .csv datasets');
             }
             $ds = new \PHPUnit_Extensions_Database_DataSet_CsvDataSet(';');
             $ds->addTable($this->tablename, $filename);
             break;
         case "yml":
         case "yaml":
             $ds = new \PHPUnit_Extensions_Database_DataSet_YamlDataSet($filename, new YamlParser());
             break;
         case "xml":
             $ds = new \PHPUnit_Extensions_Database_DataSet_XmlDataSet($filename);
             break;
         default:
             throw new \InvalidArgumentException('Unsupported format: ' . $format);
             break;
     }
     $this->dataset = $ds;
 }
开发者ID:linkorb,项目名称:transmogrifier,代码行数:38,代码来源:Dataset.php


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