sebastianbergmann / dbunit

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

Added a Vagrantfile and fixed 2 mysql-related bugs #137

Closed zerkms closed 9 years ago

zerkms commented 10 years ago
  1. I added Vagrantfile that sets up the all necessary environment to contribute the project (including mysql).

Usage:

vagrant up
# wait several minutes to download and install everything
vagrant ssh
cd /vagrant
bin/phpunit # all tests must pass, there should be no skipped tests
  1. I fixed a bug with instantiating multiple data sources in tests. Seems like it has been broken for ages - you just could not instantiate more than one different database in unit tests
  2. I fixed TRUNCATE behaviour for mysql - the dbunit unit tests were also affected

Now everything passes and nothing is skipped:

vagrant@precise64:/vagrant$ bin/phpunit
PHPUnit 4.0.12 by Sebastian Bergmann.

Configuration read from /vagrant/phpunit.xml

................................................................. 65 / 87 ( 74%)

......................

Time: 15.35 seconds, Memory: 30.25Mb

OK (87 tests, 182 assertions)

Generating code coverage report in Clover XML format ... done

Generating code coverage report in HTML format ... done
zerkms commented 9 years ago

Guys, are you seriously not interested?

elazar commented 9 years ago

Appears this pull request has conflicts. Could you please resolve them? Sorry for the inconvenience.

zerkms commented 9 years ago

Fixed merge conflicts and travis-ci builds with using mysql (note that now there are no skipped tests)

And here is sample run in vagrant:

vagrant@precise64:/vagrant$ bin/phpunit
PHPUnit 4.0.12 by Sebastian Bergmann.

Configuration read from /vagrant/phpunit.xml

................................................................. 65 / 88 ( 73%)

.......................

Time: 13.41 seconds, Memory: 30.25Mb

OK (88 tests, 183 assertions)

Generating code coverage report in Clover XML format ... done

Generating code coverage report in HTML format ... done
elazar commented 9 years ago

Thanks.