for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
*
* (c) Yaroslav Honcharuk <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Yarhon\RouteGuardBundle\Security\Test;
/**
* TestBag holds a set of authorization tests. Each test is represented by a TestInterface instance.
* @author Yaroslav Honcharuk <[email protected]>
class TestBag implements TestBagInterface, ProviderAwareInterface
{
use ProviderAwareTrait;
* @var TestInterface[]
private $tests = [];
* @param TestInterface[] $tests
public function __construct(array $tests)
foreach ($tests as $test) {
$this->add($test);
}
* {@inheritdoc}
public function getTests()
return $this->tests;
* @param TestInterface $test
private function add(TestInterface $test)
$this->tests[] = $test;