tests/GameOfLife/Inputs/BoardEditor/Options/SaveTemplateOptionTest.php
/**
     * Checks whether the constructor works as expected.
     *
     * @covers \BoardEditor\Options\SaveTemplateOption::__construct()
     *
     * @throws \Exception
     */
Checks whether the constructor works as expected.

@throws \Exception
Checks whether the constructor works as expected . @throws \ Exception
public function testCanBeConstructed()
    {
        $fakeTemplateDirectory = "test";
        $boardEditor = new BoardEditor($fakeTemplateDirectory);
        $option = new SaveTemplateOption($boardEditor);
        $templateSaver = new TemplateSaver($fakeTemplateDirectory);
        $this->assertEquals("save", $option->name());
        $this->assertEquals("saveTemplate", $option->callback());
        $this->assertEquals("Saves the board as a template", $option->description());
        $this->assertEquals(1, $option->getNumberOfArguments());
        $this->assertEquals($templateSaver, $option->templateSaver());
        $this->assertEquals($boardEditor, $option->parentBoardEditor());
    }
public function testCanBeConstructed ( ) { $ fakeTemplateDirectory = " test " ; $ boardEditor = new BoardEditor ( $ fakeTemplateDirectory ) ; $ option = new SaveTemplateOption ( $ boardEditor ) ; $ templateSaver = new TemplateSaver ( $ fakeTemplateDirectory ) ; $ this -> assertEquals ( " save " , $ option -> name ( ) ) ; $ this -> assertEquals ( " saveTemplate " , $ option -> callback ( ) ) ; $ this -> assertEquals ( " Saves the board as a template " , $ option -> description ( ) ) ; $ this -> assertEquals ( 1 , $ option -> getNumberOfArguments ( ) ) ; $ this -> assertEquals ( $ templateSaver , $ option -> templateSaver ( ) ) ; $ this -> assertEquals ( $ boardEditor , $ option -> parentBoardEditor ( ) ) ; }
Checks whether the constructor works as expected.
Checks whether the constructor works as expected .