1--TEST--
2single_link_002: Append links to an initially empty linked list
3--FILE--
4<?php
5
6$dir = dirname(__FILE__);
7require 'Structures/LinkedList/Single.php';
8require 'SingleLinkTester.php';
9
10$xyy = new Structures_LinkedList_Single();
11$xyy->appendNode($tester1);
12$xyy->appendNode($tester2);
13$xyy->appendNode($tester3);
14$xyy->insertNode($tester4, $tester2, true);
15
16$link = $xyy->current();
17print $link->getNumb();
18
19// test iteration with while()
20while ($link = $xyy->next()) {
21    print $link->getNumb();
22}
23$link = $xyy->rewind();
24print "\n";
25print $link->getNumb();
26print "\n";
27
28// test foreach() iteration
29foreach ($xyy as $bull) {
30  print $bull->getNumb();
31}
32?>
33--EXPECT--
341423
351
361423
37