Rework the tests
oliverklee opened this issue · comments
Oliver Klee commented
I'd like to rework the tests like this (in multiple steps):
- #252 change the topmost test namespace from
Sabberworm\CSS
toSabberworm\CSS\Tests
so that tests have their own namespace (so that one namespace does not map to two different directories) - #252 add PSR-4 dev-autoloading for the tests
- change
$this->assert*
toself::assert*
(as the assert methods are static, and think that it's cleaner to call static methods statically) - change the test names from using the
test
prefix (e.g.,testStringQuotingType
) to use the@test
annotation so that the tests names are shorter and can later be reworded to be statements likeemptyStringDoesNotProduceAnyRules
(as a made-up example) - reword the test names to be sentences describing the tested behavior
- split up some test methods so that each test (in the optimal case) tests exact one piece of behavior (which makes the tests easier to understand, and which also helps debug the cause of a problem if a test fails)
@sabberworm @westonruter Would these changes be okay for you?
Raphael Schweikert commented
Sounds good, thanks. Thanks for tackling this.