You are here

public function HelperSetTest::testIteration in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Helper/HelperSetTest.php \Symfony\Component\Console\Tests\Helper\HelperSetTest::testIteration()

@covers \Symfony\Component\Console\Helper\HelperSet::getIterator

File

vendor/symfony/console/Tests/Helper/HelperSetTest.php, line 117

Class

HelperSetTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testIteration() {
  $helperset = new HelperSet();
  $helperset
    ->set($this
    ->getGenericMockHelper('fake_helper_01', $helperset));
  $helperset
    ->set($this
    ->getGenericMockHelper('fake_helper_02', $helperset));
  $helpers = array(
    'fake_helper_01',
    'fake_helper_02',
  );
  $i = 0;
  foreach ($helperset as $helper) {
    $this
      ->assertEquals($helpers[$i++], $helper
      ->getName());
  }
}