是否可以在PHPUnit上加载多个平面xml数据集来加载大量的灯具?
我们正在编写一个相当复杂的应用程序,并且xml数据集变得非常大,所以我想把它放到2-3 xml中.
以下是测试用例的当前代码:
<?php
class My_TestBase extends Zend_Test_PHPUnit_DatabaseTestCase{
/**
* Zend_Application
* @var Zend_Application
*/
protected $_application;
/**
* Connection
*
* @var Zend_Test_PHPUnit_Db_Connection
*/
private $_connection;
/**
* Returns the test database connection.
*
* @link http://framework.zend.com/wiki/display/ZFPROP/Zend_Test_PHPUnit_Database+-+Benjamin+Eberlei
* @return PHPUnit_Extensions_Database_DB_IDatabaseConnection
*/
protected function getConnection(){
if($this->_connection === null){
$Resources = $this->_application->getOption("resources");
$conn = Zend_Db::factory($Resources["db"]["adapter"], $Resources["db"]["params"]);
$this->_connection = $this->createZendDbConnection($conn, $Resources["db"]["params"]["dbname"]);
}
return $this->_connection;
}
/**
* Returns the test dataset.
*
* @link http://framework.zend.com/wiki/display/ZFPROP/Zend_Test_PHPUnit_Database+-+Benjamin+Eberlei
* @return PHPUnit_Extensions_Database_DataSet_IDataSet
*/
protected function …Run Code Online (Sandbox Code Playgroud)