tests/GameOfLife/Inputs/BoardEditor/Options/HelpOptionTest.php
/**
     * Checks whether the option can exit the board editor.
     *
     * @covers \BoardEditor\Options\HelpOption::displayHelp()
     *
     * @throws \Exception
     */
Checks whether the option can exit the board editor.

@throws \Exception
Checks whether the option can exit the board editor . @throws \ Exception
public function testCanDisplayHelp()
    {
        $boardEditor = new BoardEditor("test");
        $option = new HelpOption($boardEditor);
        $expectedOutput =  "\nSet the coordinates for the living cells as below:\n" .
                           "<X-Coordinate" . ">,<Y-Coordinate" . ">\n" .
                           "Enter the coordinates of a set field to unset it.\n" .
                           "The game starts when you type \"start\" in a new line and press <"."Enter>\n" .
                           "You can save your board configuration before starting the simulation by typing \"save\"\n" .
                           "Type \"options\" to see a list of all valid options\n" .
                           "Let's Go:\n\n";
        $this->expectOutputString($expectedOutput);
        $result = $option->displayHelp();
        $this->assertFalse($result);
    }
public function testCanDisplayHelp ( ) { $ boardEditor = new BoardEditor ( " test " ) ; $ option = new HelpOption ( $ boardEditor ) ; $ expectedOutput = " \n Set the coordinates for the living cells as below: \n " . " <X-Coordinate " . " >,<Y-Coordinate " . " > \n " . " Enter the coordinates of a set field to unset it. \n " . " The game starts when you type  \" start \"  in a new line and press < " . " Enter> \n " . " You can save your board configuration before starting the simulation by typing  \" save \" \n " . " Type  \" options \"  to see a list of all valid options \n " . " Let's Go: \n \n " ; $ this -> expectOutputString ( $ expectedOutput ) ; $ result = $ option -> displayHelp ( ) ; $ this -> assertFalse ( $ result ) ; }
Checks whether the option can exit the board editor.
Checks whether the option can exit the board editor .