X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FTester%2FResult%2FTestResults.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FTestwork%2FTester%2FResult%2FTestResults.php;h=0000000000000000000000000000000000000000;hp=5102f3747314205e470fdefce4eef41cc5d56db8;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/behat/behat/src/Behat/Testwork/Tester/Result/TestResults.php b/vendor/behat/behat/src/Behat/Testwork/Tester/Result/TestResults.php deleted file mode 100644 index 5102f3747..000000000 --- a/vendor/behat/behat/src/Behat/Testwork/Tester/Result/TestResults.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Testwork\Tester\Result; - -use ArrayIterator; -use Countable; -use IteratorAggregate; - -/** - * Aggregates multiple test results into a collection and provides informational API on top of that. - * - * @author Konstantin Kudryashov - */ -final class TestResults implements TestResult, Countable, IteratorAggregate -{ - const NO_TESTS = -100; - - /** - * @var TestResult[] - */ - private $results; - - /** - * Initializes test results collection. - * - * @param TestResult[] $results - */ - public function __construct(array $results = array()) - { - $this->results = $results; - } - - /** - * {@inheritdoc} - */ - public function isPassed() - { - return self::PASSED == $this->getResultCode(); - } - - /** - * {@inheritdoc} - */ - public function getResultCode() - { - $resultCode = static::NO_TESTS; - foreach ($this->results as $result) { - $resultCode = max($resultCode, $result->getResultCode()); - } - - return $resultCode; - } - - /** - * {@inheritdoc} - */ - public function count() - { - return count($this->results); - } - - /** - * {@inheritdoc} - */ - public function getIterator() - { - return new ArrayIterator($this->results); - } - - /** - * Returns test results array. - * - * @return TestResult[] - */ - public function toArray() - { - return $this->results; - } -}