Jyxo\Input\FluentTest::testInvalidWalk PHP Method

testInvalidWalk() public method

Tests validation failure in the middle of a string.
public testInvalidWalk ( )
    public function testInvalidWalk()
    {
        $current = [42, 0, 'nulák'];
        $input = new Fluent();
        $input->check($current, 'data')->walk(false)->validate('isInt');
        $this->assertFalse($input->isValid());
        try {
            $input->validateAll();
            $this->fail(sprintf('Expected exception %s.', \Jyxo\Input\Validator\Exception::class));
        } catch (\PHPUnit_Framework_AssertionFailedError $e) {
            throw $e;
        } catch (\Exception $e) {
            // Correctly thrown exception
            $this->assertInstanceOf(\Jyxo\Input\Validator\Exception::class, $e);
        }
    }