for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SimpleSAML\Module\monitor;
abstract class TestSuiteFactory extends TestFactory
{
/**
* @var array|null
*/
private $tests = null;
* @param TestConfiguration|null $configuration
* @param TestData|null $testData
public function __construct($configuration = null, $testData = null)
assert($configuration instanceof TestConfiguration || is_null($configuration));
$this->setConfiguration($configuration);
$this->initialize($testData);
$this->invokeTestSuite();
}
*
* @return void
protected function initialize($testData = null)
$testData
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
* @param TestFactory $test
protected function addTest($test)
assert($test instanceof TestFactory);
$this->tests[] = $test;
* @return array
public function getTests()
assert(is_array($this->tests));
return $this->tests;
protected function calculateState()
$tests = $this->getTests();
if (!empty($tests)) {
$overall = array();
foreach ($tests as $test) {
$overall[] = $test->getState();
$this->setState(min($overall));
abstract protected function invokeTestSuite();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.