Exemplo n.º 1
0
 /**
  * Test proxy behavior with the magic method getIterator. If the call is forwarded to the active state.
  */
 public function testGetIterator()
 {
     $this->initializeProxy('state1', true);
     $iterator = new \ArrayIterator([1, 2, 3]);
     $this->state1->setClosure(function () use($iterator) {
         return $iterator;
     });
     $this->assertSame($iterator, $this->proxy->getIterator());
 }