ConstraintC example

$constraint = new ConstraintA();

        $this->expectException(InvalidOptionsException::class);

        $constraint->foo = 'bar';
    }

    public function testInvalidAndRequiredOptionsPassed()
    {
        $this->expectException(InvalidOptionsException::class);

        new ConstraintC([
            'option1' => 'default',
            'foo' => 'bar',
        ]);
    }

    public function testSetDefaultProperty()
    {
        $constraint = new ConstraintA('foo');

        $this->assertEquals('foo', $constraint->property2);
    }

    
Home | Imprint | This part of the site doesn't use cookies.