Bearsampp 2026.9.23
Loading...
Searching...
No Matches
AcyclicTestTest Class Reference
Inheritance diagram for AcyclicTestTest:
Collaboration diagram for AcyclicTestTest:

Public Member Functions

 testIsAcyclicFalse ()
 testIsAcyclicTrue ()

Detailed Description

Definition at line 5 of file AcyclicTestTest.php.

Member Function Documentation

◆ testIsAcyclicFalse()

testIsAcyclicFalse ( )

Definition at line 7 of file AcyclicTestTest.php.

8 {
9 $graph = new Structures_Graph();
10 $node1 = new Structures_Graph_Node();
11 $graph->addNode($node1);
12
13 $node2 = new Structures_Graph_Node();
14 $graph->addNode($node2);
15 $node1->connectTo($node2);
16
17 $node3 = new Structures_Graph_Node();
18 $graph->addNode($node3);
19 $node2->connectTo($node3);
20
21 $node3->connectTo($node1);
22
23 $this->assertFalse(
25 'Graph is cyclic'
26 );
27 }

References Structures_Graph_Manipulator_AcyclicTest\isAcyclic().

Here is the call graph for this function:

◆ testIsAcyclicTrue()

testIsAcyclicTrue ( )

Definition at line 29 of file AcyclicTestTest.php.

30 {
31 $graph = new Structures_Graph();
32 $node1 = new Structures_Graph_Node();
33 $graph->addNode($node1);
34
35 $node2 = new Structures_Graph_Node();
36 $graph->addNode($node2);
37 $node1->connectTo($node2);
38
39 $node3 = new Structures_Graph_Node();
40 $graph->addNode($node3);
41 $node2->connectTo($node3);
42
43 $this->assertTrue(
45 'Graph is acyclic'
46 );
47 }

References Structures_Graph_Manipulator_AcyclicTest\isAcyclic().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • E:/Bearsampp-development/sandbox/core/libs/php/pear/tests/Structures_Graph/tests/AcyclicTestTest.php