sebastianbergmann / dbunit

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

assertTablesEqual fails if yml dataset has and empty value and db value is NULL #127

Closed Trudko closed 6 years ago

Trudko commented 10 years ago

Hi,

I have yml dataset file with empty value like this:

  -
    something:
    something-else: value

when I compare this value using assertTablesEqual with NULL from database, test fails because value from DB is null but value comming from yml is unitiliazed( and !== comparison return TRUE.

for ($i = 0; $i < $rowCount; $i++) {
            foreach ($columns as $columnName) {
                if ($this->getValue($i, $columnName) !== $other->getValue($i, $columnName)) {
                    $this->other = $other;
                    return FALSE;
                }
            }
        }

$this->getValue($i, $columnName) returns null and $other->getValue($i, $columnName) is unitiliazed.

moses-gangipogu commented 10 years ago

@Trudko i am to having the same problem, but am using an xml file how can i implement in this https://github.com/sebastianbergmann/dbunit/issues/128 please help i am rying this alot from 2 days but yet no solution for this

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.