Hackzilla\PasswordGenerator\Tests\Generator\ComputerPasswordGeneratorTest::testSetOptionSimilar PHP Method

testSetOptionSimilar() public method

    public function testSetOptionSimilar()
    {
        $exists = array('a', 'b', 'c', 'A', 'B', 'C');
        $dontExist = array('o', 'l', 'O');
        $this->_object->setOptionValue(ComputerPasswordGenerator::OPTION_UPPER_CASE, true)->setOptionValue(ComputerPasswordGenerator::OPTION_LOWER_CASE, true)->setOptionValue(ComputerPasswordGenerator::OPTION_AVOID_SIMILAR, true);
        $availableCharacters = $this->_object->getCharacterList()->getCharacters();
        foreach ($exists as $check) {
            $this->assertContains($check, $availableCharacters);
        }
        foreach ($dontExist as $check) {
            $this->assertNotContains($check, $availableCharacters);
        }
    }