You are here

public function HelperSetTest::testConstructor 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::testConstructor()

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

File

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

Class

HelperSetTest

Namespace

Symfony\Component\Console\Tests\Helper

Code

public function testConstructor() {
  $mock_helper = $this
    ->getGenericMockHelper('fake_helper');
  $helperset = new HelperSet(array(
    'fake_helper_alias' => $mock_helper,
  ));
  $this
    ->assertEquals($mock_helper, $helperset
    ->get('fake_helper_alias'), '__construct sets given helper to helpers');
  $this
    ->assertTrue($helperset
    ->has('fake_helper_alias'), '__construct sets helper alias for given helper');
}