FOSSology  4.7.1
Open Source License Compliance by Open Source Software
Fossology\Lib\UI\MenuHookTest Class Reference

Test for class MenuHook. More...

Inheritance diagram for Fossology\Lib\UI\MenuHookTest:
Inheritance graph
Collaboration diagram for Fossology\Lib\UI\MenuHookTest:
Collaboration graph

Public Member Functions

 testMovesReuserAndScancodeBeforeDecider ()
 
 testOnlyMovesAgentsThatAreAfterDecider ()
 
 testNoOpWhenAlreadyOrdered ()
 
 testNoOpWhenDeciderAbsent ()
 
 testNoOpWhenNeitherAgentPresent ()
 
 testEmptyListIsNoOp ()
 
 testDeciderOnlyIsNoOp ()
 
 testNeverLosesOrDuplicatesEntries ()
 

Detailed Description

Test for class MenuHook.

Definition at line 14 of file MenuHookTest.php.

Member Function Documentation

◆ testDeciderOnlyIsNoOp()

Fossology\Lib\UI\MenuHookTest::testDeciderOnlyIsNoOp ( )
Test:
  1. decider is the only entry.
  2. Verify no error and the list is unchanged.

Definition at line 113 of file MenuHookTest.php.

◆ testEmptyListIsNoOp()

Fossology\Lib\UI\MenuHookTest::testEmptyListIsNoOp ( )
Test:
  1. Empty list.
  2. Verify no error and the list stays empty.

Definition at line 99 of file MenuHookTest.php.

◆ testMovesReuserAndScancodeBeforeDecider()

Fossology\Lib\UI\MenuHookTest::testMovesReuserAndScancodeBeforeDecider ( )
Test:
  1. decider before scancode/reuser in menu order (the real, alphabetically sorted case: "Automatic..." < "Scancode...").
  2. Verify both are moved to just before decider, in their original relative order, with nothing else disturbed.

Definition at line 23 of file MenuHookTest.php.

◆ testNeverLosesOrDuplicatesEntries()

Fossology\Lib\UI\MenuHookTest::testNeverLosesOrDuplicatesEntries ( )
Test:
  1. No entry is lost or duplicated across every combination this function can plausibly see, regardless of starting order.

Definition at line 127 of file MenuHookTest.php.

◆ testNoOpWhenAlreadyOrdered()

Fossology\Lib\UI\MenuHookTest::testNoOpWhenAlreadyOrdered ( )
Test:
  1. Both already before decider.
  2. Verify the list is untouched (idempotent).

Definition at line 57 of file MenuHookTest.php.

◆ testNoOpWhenDeciderAbsent()

Fossology\Lib\UI\MenuHookTest::testNoOpWhenDeciderAbsent ( )
Test:
  1. decider absent from the list (e.g. not installed/selected).
  2. Verify the list is untouched.

Definition at line 71 of file MenuHookTest.php.

◆ testNoOpWhenNeitherAgentPresent()

Fossology\Lib\UI\MenuHookTest::testNoOpWhenNeitherAgentPresent ( )
Test:
  1. Neither reuser nor scancode present.
  2. Verify the list is untouched.

Definition at line 85 of file MenuHookTest.php.

◆ testOnlyMovesAgentsThatAreAfterDecider()

Fossology\Lib\UI\MenuHookTest::testOnlyMovesAgentsThatAreAfterDecider ( )
Test:
  1. scancode already before decider, reuser after.
  2. Verify only reuser moves; scancode's position is left alone.

Definition at line 43 of file MenuHookTest.php.


The documentation for this class was generated from the following file: