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

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 callback generator iterator.

Definition at line 50 of file CallbackGenerator.php.

Member Function Documentation

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

Definition at line 52 of file CallbackGenerator.php.

53  {
54  $this
55  ->given(
56  $iterator = new LUT\CallbackGenerator(function ($key) {
57  return $key * 2;
58  }),
59  $limit = new LUT\Limit($iterator, 0, 5)
60  )
61  ->when($result = iterator_to_array($limit))
62  ->then
63  ->array($result)
64  ->isEqualTo([
65  0,
66  2,
67  4,
68  6,
69  8
70  ]);
71  }

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