sebastianbergmann / dbunit

DbUnit port for PHP/PHPUnit.
https://phpunit.de/
Other
225 stars 186 forks source link

PHPUnit_Extensions_Database_DataSet_DataSetFilter->getRow is always returning null after setIncludeColumnsForTable #140

Closed monosite closed 6 years ago

monosite commented 10 years ago

$queryDataSet = new PHPUnit_Extensions_Database_DataSet_QueryDataSet($this->getConnection()); $queryDataSet->addTable('foo', 'SELECT * FROM foo'); $filteredDataSet = new PHPUnit_Extensions_Database_DataSet_DataSetFilter($queryDataSet); $arr_includedColumn = ['id', 'foo']; $filteredDataSet->setIncludeColumnsForTable($str_tableName, $arr_includedColumn);

$filteredDataSet->getTable('foo')->getRow(0); <= this always return null no matter what

monosite commented 10 years ago

If call assertContainsRow([0]) before calling getRow(0), this is fixed. I think $this->loadData() is missing at some point.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.