public function testListAll()
 {
     $firstData = $this->generateData();
     $secondData = $this->generateData();
     $this->doubleLinkedList->push($firstData);
     $this->doubleLinkedList->push($secondData);
     $dataArray = [$firstData, $secondData];
     $this->assertTrue($this->doubleLinkedList->listAll() == $dataArray);
 }
Beispiel #2
0
 /**
  *
  */
 public function testInsertionSort()
 {
     $start = microtime();
     $this->sortable->insertionSort($this->doubleLinkedList);
     self::assertEquals($this->doubleLinkedList->listAll(), $this->sorted);
     $end = microtime();
     echo "\n" . "Insertion Sort: " . ($end - $start);
 }