tests/GameOfLife/Inputs/BoardEditor/BoardEditorTest.php
/**
     * Checks whether the getters and setters work as expected.
     *
     * @covers \BoardEditor\BoardEditor::board()
     * @covers \BoardEditor\BoardEditor::setBoard()
     * @covers \BoardEditor\BoardEditor::optionHandler()
     * @covers \BoardEditor\BoardEditor::setOptionHandler()
     * @covers \BoardEditor\BoardEditor::output()
     * @covers \BoardEditor\BoardEditor::setOutput()
     * @covers \BoardEditor\BoardEditor::templateDirectory()
     * @covers \BoardEditor\BoardEditor::setTemplateDirectory()
     *
     * @throws \Exception
     */
Checks whether the getters and setters work as expected.

@throws \Exception
Checks whether the getters and setters work as expected . @throws \ Exception
public function testCanSetAttributes()
    {
        $boardEditor = new BoardEditor("hello");
        $optionHandler = new BoardEditorOptionHandler($boardEditor);
        $output = new BoardEditorOutput();
        $templateDirectory = "This/is/a/very/serious/test";
        $boardEditor->setBoard($this->testBoard);
        $boardEditor->setOptionHandler($optionHandler);
        $boardEditor->setOutput($output);
        $boardEditor->setTemplateDirectory($templateDirectory);
        $this->assertEquals($this->testBoard, $boardEditor->board());
        $this->assertEquals($optionHandler, $boardEditor->optionHandler());
        $this->assertEquals($output, $boardEditor->output());
        $this->assertEquals($templateDirectory, $boardEditor->templateDirectory());
    }
public function testCanSetAttributes ( ) { $ boardEditor = new BoardEditor ( " hello " ) ; $ optionHandler = new BoardEditorOptionHandler ( $ boardEditor ) ; $ output = new BoardEditorOutput ( ) ; $ templateDirectory = " This/is/a/very/serious/test " ; $ boardEditor -> setBoard ( $ this -> testBoard ) ; $ boardEditor -> setOptionHandler ( $ optionHandler ) ; $ boardEditor -> setOutput ( $ output ) ; $ boardEditor -> setTemplateDirectory ( $ templateDirectory ) ; $ this -> assertEquals ( $ this -> testBoard , $ boardEditor -> board ( ) ) ; $ this -> assertEquals ( $ optionHandler , $ boardEditor -> optionHandler ( ) ) ; $ this -> assertEquals ( $ output , $ boardEditor -> output ( ) ) ; $ this -> assertEquals ( $ templateDirectory , $ boardEditor -> templateDirectory ( ) ) ; }
Checks whether the getters and setters work as expected.
Checks whether the getters and setters work as expected .