Exemplo n.º 1
0
 public function testShouldConfigureOptions()
 {
     $phpGuard = new PhpGuard();
     $phpGuard->setOptions(array('ignores' => 'test'));
     $options = $phpGuard->getOptions();
     $this->assertSame(array('test'), $options['ignores']);
     $ignores = array('foo', 'bar');
     $phpGuard->setOptions(array('ignores' => $ignores));
     $options = $phpGuard->getOptions();
     $this->assertSame($ignores, $options['ignores']);
 }
Exemplo n.º 2
0
    function it_should_process_global_section(ContainerInterface $container, PhpGuard $guard)
    {
        $guard->setOptions(array('ignores' => 'app/cache'))->shouldBeCalled();
        $text = <<<EOF
phpguard:
    ignores: app/cache
EOF;
        $this->compile($text);
    }