Feature #11

Module test case

Added by Davide Principi over 8 years ago. Updated over 6 years ago.

Status:CLOSEDStart date:03/25/2011
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-nethgui
Target version:Epsilon
Resolution: NEEDINFO:

Description

Implement basic PHPUnit test case class for Modules.

Associated revisions

Revision fbb348a4
Added by Davide Principi over 8 years ago

Refs #11. Implemented basic ModuleTestCase class.

Revision 3a250198
Added by Davide Principi over 8 years ago

Refs #11. Removed mock cache for getAdapter method.

Revision acc43ddb
Added by Davide Principi over 8 years ago

Refs #11. Defined database operation codes as part of module testing API.

Revision b840e726
Added by Davide Principi over 8 years ago

Refs #11. Added mock database caching to keep `->at` expectations counters consistent.

Revision 0a59c5b1
Added by Davide Principi about 8 years ago

Refs #11. Added user mock object for NotificationArea.

Revision 0194776f
Added by Davide Principi about 8 years ago

Refs #11. New module test case: extend Test_Tool_ModuleTestCase class.

Revision 42951c72
Added by Davide Principi about 8 years ago

Refs #11. Renamed Tests/ => Test/ directory.

Revision 14caaf65
Added by Davide Principi about 8 years ago

Refs #11. Tests for Test_Tool_MockState class.

Revision e84a88bb
Added by Davide Principi about 8 years ago

Refs #11. Updated DB wrappers.

ModuleTestCase: Modified setter methods to support chainable calls.

History

#1 Updated by Davide Principi over 8 years ago

  • Assignee set to Davide Principi
  • Target version set to Epsilon

#2 Updated by Davide Principi over 8 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:
    1. initialize class members moduleParameters, expectedView, expectedDb. See phpdocs for instructions about setting them up.
    2. Invoke parent's method runModuleTestProcedure

See RemoteManagementTest (source:Tests/Unit/NethGui/Module/RemoteAccess/RemoteManagementTest.php@f22aedab)

#3 Updated by Davide Principi over 8 years ago

  • Due date deleted (03/25/2011)

#4 Updated by Davide Principi over 8 years ago

  • Status changed from ON_DEV to CLOSED
  • % Done changed from 80 to 100

Also available in: Atom PDF