摘要: PHPUnit supports the declaration of explicit dependencies between test methods. Such dependencies do not define the order in which the test methods are to be executed but they allow the returning of an instance of the test fixture by a producer and passing it to the dependent consumers.A producer is 阅读全文
posted @ 2013-05-26 10:03 水月灵心 阅读(263) 评论(0) 推荐(0) 编辑
摘要: The basic conventions and steps for writing tests with PHPUnit:1. The tests for a classClassgo into a classClassTest.2. ClassTestinherits (most of the time) fromPHPUnit_Framework_TestCase.3. The tests are public methods that are namedtest*. Alternatively, you can use the@testannotation in a method&# 阅读全文
posted @ 2013-05-26 09:38 水月灵心 阅读(199) 评论(0) 推荐(0) 编辑