Hoa central
Public Member Functions | List of all members
Hoa\Iterator\Test\Unit\NoRewind Class Reference
Inheritance diagram for Hoa\Iterator\Test\Unit\NoRewind:

Public Member Functions

 case_classic ()
 
- Public Member Functions inherited from Hoa\Test\Unit\Suite
 __construct ()
 
 getTestedClassName ()
 
 getTestedClassNamespace ()
 
 beforeTestMethod ($methodName)
 

Detailed Description

Class .

Test suite of the no-rewind iterator.

Definition at line 50 of file NoRewind.php.

Member Function Documentation

Hoa\Iterator\Test\Unit\NoRewind::case_classic ( )

Definition at line 52 of file NoRewind.php.

53  {
54  $this
55  ->given(
56  $dummyArray = ['f', 'o', 'o', 'b', 'a', 'r'],
57  $iterator = new LUT\Map($dummyArray),
58  $norewind = new LUT\NoRewind($iterator)
59  )
60  ->when($result = iterator_to_array($norewind))
61  ->then
62  ->array($result)
63  ->isEqualTo($dummyArray)
64 
65  ->when($norewind->rewind())
66  ->boolean($norewind->valid())
67  ->isFalse()
68 
69  ->when($result = iterator_to_array($norewind))
70  ->then
71  ->array($result)
72  ->isEmpty();
73  }

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