Example #1
0
 public function testCon()
 {
     $container = new Container(['resources' => ['foo' => ['constraints' => ['allowed' => ['foo', 'bar']]]]]);
     $this->assertEquals(['foo', 'bar'], $container->allowed('foo'));
 }
Example #2
0
 public function testMandatoryConstraintsAreAutomaticallyAllowed()
 {
     $container = new Container(['resources' => ['foo' => ['constraints' => ['mandatory' => ['mandatory_property']]]]]);
     $this->assertEquals(['mandatory_property'], $container->allowed('foo'));
 }