laracasts / TestDummy

Easy factories for PHP integration testing.
https://laracasts.com/lessons/whats-new-in-testdummy
MIT License
456 stars 80 forks source link

Fixed bug regarding NULL values overrides #24

Closed jeroennoten closed 10 years ago

jeroennoten commented 10 years ago

Currently, it is not possibly to override a value and set it to the value null, in order to set a nullable field in the database to NULL. Instead, will be cast to an empty string while replacing it (with preg_replace_callback()). This PR fixes that bug.

I made one of the tests fail due to the bug and wrote a fix for it.

siegerhansma commented 10 years ago

Just came across the exact same bug with a Date field. Thanks for the PR!

jeroennoten commented 10 years ago

Yep, same bug. This PR fixes also that one.