tests/GameOfLife/Inputs/BoardEditor/OptionHandler/BoardEditorOptionHandlerTest.php
/**
     * Checks whether the getters/setters work as expected.
     *
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::options()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::setOptions()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::optionLoader()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::setOptionLoader()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::optionParser()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::setOptionParser()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::parentBoardEditor()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionHandler::setParentBoardEditor()
     *
     * @throws \Exception
     */
Checks whether the getters/setters work as expected.

@throws \Exception
Checks whether the getters / setters work as expected . @throws \ Exception
public function testCanSetAttributes()
    {
        $boardEditor = new BoardEditor("test");
        $optionHandler = new BoardEditorOptionHandler($boardEditor);
        $testBoardEditor = new BoardEditor("mytest");
        $testOptionHandler = new BoardEditorOptionHandler($testBoardEditor);
        $optionLoader = new BoardEditorOptionLoader($testOptionHandler);
        $optionParser = new BoardEditorOptionParser($optionHandler);
        $options = array("hello", "test", "my", "options");
        $optionHandler->setOptions($options);
        $optionHandler->setOptionLoader($optionLoader);
        $optionHandler->setOptionParser($optionParser);
        $optionHandler->setParentBoardEditor($testBoardEditor);
        $this->assertEquals($options, $optionHandler->options());
        $this->assertEquals($optionLoader, $optionHandler->optionLoader());
        $this->assertEquals($optionParser, $optionHandler->optionParser());
        $this->assertEquals($testBoardEditor, $optionHandler->parentBoardEditor());
    }
public function testCanSetAttributes ( ) { $ boardEditor = new BoardEditor ( " test " ) ; $ optionHandler = new BoardEditorOptionHandler ( $ boardEditor ) ; $ testBoardEditor = new BoardEditor ( " mytest " ) ; $ testOptionHandler = new BoardEditorOptionHandler ( $ testBoardEditor ) ; $ optionLoader = new BoardEditorOptionLoader ( $ testOptionHandler ) ; $ optionParser = new BoardEditorOptionParser ( $ optionHandler ) ; $ options = array ( " hello " , " test " , " my " , " options " ) ; $ optionHandler -> setOptions ( $ options ) ; $ optionHandler -> setOptionLoader ( $ optionLoader ) ; $ optionHandler -> setOptionParser ( $ optionParser ) ; $ optionHandler -> setParentBoardEditor ( $ testBoardEditor ) ; $ this -> assertEquals ( $ options , $ optionHandler -> options ( ) ) ; $ this -> assertEquals ( $ optionLoader , $ optionHandler -> optionLoader ( ) ) ; $ this -> assertEquals ( $ optionParser , $ optionHandler -> optionParser ( ) ) ; $ this -> assertEquals ( $ testBoardEditor , $ optionHandler -> parentBoardEditor ( ) ) ; }
Checks whether the getters/setters work as expected.
Checks whether the getters / setters work as expected .