tests/GameOfLife/Inputs/BoardEditor/OptionHandler/BoardEditorOptionParserTest.php
/**
     * Checks whether the getters/setters work as expected.
     *
     * @dataProvider setAttributesProvider()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionParser::parentOptionHandler()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionParser::setParentOptionHandler()
     *
     * @param String $_templateDirectory Template directory
     *
     * @throws \Exception
     */
Checks whether the getters/setters work as expected.

@param String $_templateDirectory Template directory

@throws \Exception
Checks whether the getters / setters work as expected . @param String $_templateDirectory Template directory @throws \ Exception
public function testCanSetAttributes(String $_templateDirectory)
    {
        $boardEditor = new BoardEditor("tests");
        $optionHandler = new BoardEditorOptionHandler($boardEditor);
        $optionParser = new BoardEditorOptionParser($optionHandler);
        $testBoardEditor = new BoardEditor($_templateDirectory);
        $testOptionHandler = new BoardEditorOptionHandler($testBoardEditor);
        $optionParser->setParentOptionHandler($testOptionHandler);
        $this->assertEquals($testOptionHandler, $optionParser->parentOptionHandler());
    }
public function testCanSetAttributes ( String $ _templateDirectory ) { $ boardEditor = new BoardEditor ( " tests " ) ; $ optionHandler = new BoardEditorOptionHandler ( $ boardEditor ) ; $ optionParser = new BoardEditorOptionParser ( $ optionHandler ) ; $ testBoardEditor = new BoardEditor ( $ _templateDirectory ) ; $ testOptionHandler = new BoardEditorOptionHandler ( $ testBoardEditor ) ; $ optionParser -> setParentOptionHandler ( $ testOptionHandler ) ; $ this -> assertEquals ( $ testOptionHandler , $ optionParser -> parentOptionHandler ( ) ) ; }
Checks whether the getters/setters work as expected.
Checks whether the getters / setters work as expected .