getMissingOptions example

$this->resolver->setRequired('foo');
        $this->resolver->clear();
        $this->assertFalse($this->resolver->isRequired('foo'));
    }

    public function testGetMissingOptions()
    {
        $this->resolver->setRequired(['foo', 'bar']);
        $this->resolver->setDefault('bam', 'baz');
        $this->resolver->setDefault('foo', 'boo');

        $this->assertSame(['bar']$this->resolver->getMissingOptions());
    }

    public function testFailIfSetDefinedFromLazyOption()
    {
        $this->expectException(AccessException::class);
        $this->resolver->setDefault('foo', function DOptions $options) {
            $options->setDefined('bar');
        });

        $this->resolver->resolve();
    }

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