gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.3k stars 280 forks source link

Test case duplication #81

Closed doomspork closed 12 years ago

doomspork commented 13 years ago

Test cases ltest.php, pgtest.php, n1test.php, and test.php all use the same code base but the the code is copied and pasted between files. Shared functionality should be extracted and referenced accordingly. This would greatly improve the maintenance of test scripts and ultimately reduce defects.

gabordemooij commented 13 years ago

I agree, however there are subtle differences. Test cases are a mess right now, they should be cleaned up.

gabordemooij commented 13 years ago

Any ideas on this? I dont want to use a test framework like phpunit I think these beasts are just overkill and it creates a dependency (unnecessary).

doomspork commented 13 years ago

I agree about PHPUnit. I'm not much for relying on libraries that use PEAR. I haven't really spent much time looking through the test cases to be honest. My attention has been focused on the double to single quote change and ensuring the test cases are updated as well.

I do have a few basic ideas on how the tests could be cleaned up. Let me get my ideas down on paper and I'll ping you with some suggestions.

johndoe46 commented 13 years ago

Just a suggestion: https://github.com/mageekguy/atoum

Modern unit test framework available as a single phar archive.

gabordemooij commented 13 years ago

Ok, checking out atoum...