tests/GameOfLife/OptionHandler/OptionHandlerTest.php
/**
     * Checks whether the option handler can successfully initialize the option list.
     *
     * @throws \Exception
     *
     * @covers \OptionHandler\OptionHandler::__construct()
     * @covers \OptionHandler\OptionHandler::excludeClasses()
     * @covers \OptionHandler\OptionHandler::linkedOptions()
     * @covers \OptionHandler\OptionHandler::optionParser()
     * @covers \OptionHandler\OptionHandler::initializeOptions()
     * @covers \OptionHandler\OptionLoader::addDefaultOptions()
     * @covers \OptionHandler\OptionLoader::addClassOptions()
     * @covers \OptionHandler\OptionLoader::getOptionsDiff()
     */
Checks whether the option handler can successfully initialize the option list.
@throws \Exception


Checks whether the option handler can successfully initialize the option list . @throws \ Exception
public function testCanInitializeOptions()
    {
        $optionHandler = new OptionHandler();
        $options = new Getopt();
        $this->assertEquals(0, count($optionHandler->linkedOptions()));
        $this->assertInstanceOf(\OptionHandler\OptionParser::class, $optionHandler->optionParser());
        $optionHandler->initializeOptions($options);
        $this->assertEquals(50, count($options->getOptionList()));
        $this->assertEquals(40, count($optionHandler->linkedOptions()));
    }
public function testCanInitializeOptions ( ) { $ optionHandler = new OptionHandler ( ) ; $ options = new Getopt ( ) ; $ this -> assertEquals ( 0 , count ( $ optionHandler -> linkedOptions ( ) ) ) ; $ this -> assertInstanceOf ( \ OptionHandler \ OptionParser :: class , $ optionHandler -> optionParser ( ) ) ; $ optionHandler -> initializeOptions ( $ options ) ; $ this -> assertEquals ( 50 , count ( $ options -> getOptionList ( ) ) ) ; $ this -> assertEquals ( 40 , count ( $ optionHandler -> linkedOptions ( ) ) ) ; }
Checks whether the option handler can successfully initialize the option list.
Checks whether the option handler can successfully initialize the option list .