Respect\Validation\Rules\OptionalTest::testShouldCheckRuleWhenInputIsNotOptional PHP Method

testShouldCheckRuleWhenInputIsNotOptional() public method

    public function testShouldCheckRuleWhenInputIsNotOptional()
    {
        $input = 'foo';
        $validatable = $this->createMock(Validatable::class);
        $validatable->expects($this->once())->method('check')->with($input)->will($this->returnValue(true));
        $rule = new Optional($validatable);
        $this->assertTrue($rule->check($input));
    }