Feature #11
Module test case
Status: | CLOSED | Start date: | 03/25/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-nethgui | |||
Target version: | Epsilon | |||
Resolution: | NEEDINFO: |
Description
Implement basic PHPUnit test case class for Modules.
Associated revisions
Refs #11. Implemented basic ModuleTestCase class.
Refs #11. Removed mock cache for getAdapter method.
Refs #11. Defined database operation codes as part of module testing API.
Refs #11. Added mock database caching to keep `->at` expectations counters consistent.
Refs #11. Added user mock object for NotificationArea.
Refs #11. New module test case: extend Test_Tool_ModuleTestCase class.
Refs #11. Renamed Tests/ => Test/ directory.
Refs #11. Tests for Test_Tool_MockState class.
Refs #11. Updated DB wrappers.
ModuleTestCase: Modified setter methods to support chainable calls.
History
#1 Updated by Davide Principi over 10 years ago
- Assignee set to Davide Principi
- Target version set to Epsilon
#2 Updated by Davide Principi over 10 years ago
- Due date set to 03/25/2011
- Status changed from NEW to ON_DEV
- % Done changed from 0 to 80
- Estimated time set to 8.00
To build a module test case
- create a new test class extending
ModuleTestCase
(source:Tests/ModuleTestCase.php@f22aedab) - define test methods. For each test:
- initialize class members
moduleParameters
,expectedView
,expectedDb
. See phpdocs for instructions about setting them up. - Invoke parent's method
runModuleTestProcedure
- initialize class members
See RemoteManagementTest
(source:Tests/Unit/NethGui/Module/RemoteAccess/RemoteManagementTest.php@f22aedab)
#3 Updated by Davide Principi over 10 years ago
- Due date deleted (
03/25/2011)
#4 Updated by Davide Principi over 10 years ago
- Status changed from ON_DEV to CLOSED
- % Done changed from 80 to 100
#5 Updated by Davide Principi almost 10 years ago
Updated ModuleTestCase API.
See