tests/GameOfLife/Inputs/BoardEditor/OptionHandler/BoardEditorOptionLoaderTest.php
/**
     * Checks whether the getters/setters work as expected.
     *
     * @dataProvider setAttributesProvider()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionLoader::fileSystemHandler()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionLoader::setFileSystemHandler()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionLoader::parentOptionHandler()
     * @covers \BoardEditor\OptionHandler\BoardEditorOptionLoader::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)
    {
        $fileSystemReader = new FileSystemReader();
        $boardEditor = new BoardEditor("test");
        $optionHandler = new BoardEditorOptionHandler($boardEditor);
        $testBoardEditor = new BoardEditor($_templateDirectory);
        $testOptionHandler = new BoardEditorOptionHandler($testBoardEditor);
        $optionLoader = new BoardEditorOptionLoader($optionHandler);
        $optionLoader->setFileSystemHandler(($fileSystemReader));
        $optionLoader->setParentOptionHandler($testOptionHandler);
        $this->assertEquals($fileSystemReader, $optionLoader->fileSystemHandler());
        $this->assertEquals($testOptionHandler, $optionLoader->parentOptionHandler());
    }
public function testCanSetAttributes ( String $ _templateDirectory ) { $ fileSystemReader = new FileSystemReader ( ) ; $ boardEditor = new BoardEditor ( " test " ) ; $ optionHandler = new BoardEditorOptionHandler ( $ boardEditor ) ; $ testBoardEditor = new BoardEditor ( $ _templateDirectory ) ; $ testOptionHandler = new BoardEditorOptionHandler ( $ testBoardEditor ) ; $ optionLoader = new BoardEditorOptionLoader ( $ optionHandler ) ; $ optionLoader -> setFileSystemHandler ( ( $ fileSystemReader ) ) ; $ optionLoader -> setParentOptionHandler ( $ testOptionHandler ) ; $ this -> assertEquals ( $ fileSystemReader , $ optionLoader -> fileSystemHandler ( ) ) ; $ this -> assertEquals ( $ testOptionHandler , $ optionLoader -> parentOptionHandler ( ) ) ; }
Checks whether the getters/setters work as expected.
Checks whether the getters / setters work as expected .