tests/GameOfLife/Inputs/BoardEditor/BoardEditorOptionTest.php
/**
     * Checks whether an option can return whether an alias belongs to it.
     *
     * @covers \BoardEditor\BoardEditorOption::hasAlias()
     *
     * @throws \Exception
     */
Checks whether an option can return whether an alias belongs to it.

@throws \Exception
Checks whether an option can return whether an alias belongs to it . @throws \ Exception
public function testCanFindAlias()
    {
        $aliases = array("one", "two", "three");
        $boardEditor =new BoardEditor("hello");
        $option = new BoardEditorOption($boardEditor);
        $option->setAliases($aliases);
        $this->assertTrue($option->hasAlias("one"));
        $this->assertTrue($option->hasAlias("two"));
        $this->assertTrue($option->hasAlias("three"));
        $this->assertFalse($option->hasAlias("random"));
        $this->assertFalse($option->hasAlias("hello"));
        $this->assertFalse($option->hasAlias("myOption"));
    }
public function testCanFindAlias ( ) { $ aliases = array ( " one " , " two " , " three " ) ; $ boardEditor = new BoardEditor ( " hello " ) ; $ option = new BoardEditorOption ( $ boardEditor ) ; $ option -> setAliases ( $ aliases ) ; $ this -> assertTrue ( $ option -> hasAlias ( " one " ) ) ; $ this -> assertTrue ( $ option -> hasAlias ( " two " ) ) ; $ this -> assertTrue ( $ option -> hasAlias ( " three " ) ) ; $ this -> assertFalse ( $ option -> hasAlias ( " random " ) ) ; $ this -> assertFalse ( $ option -> hasAlias ( " hello " ) ) ; $ this -> assertFalse ( $ option -> hasAlias ( " myOption " ) ) ; }
Checks whether an option can return whether an alias belongs to it.
Checks whether an option can return whether an alias belongs to it .