@param \PHPUnit_Framework_Test    $test
@param \PHPUnit_Framework_Warning $e
@param float                      $time

@since Method available since Release 4.2.0
778795
public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time)
    {
        $this->writeWarning($test, $e, $time);
    }
239999
public function _failed(TestInterface $test, $fail)
    {
        if (isset($this->container) && $this->container->has(ErrorHandlerInterface::class)) {
            $error = $this->container->get(ErrorHandlerInterface::class)->getError();
            
            if ($error) {
                $this->debug((string)$error);
            }
        }

        
        parent::_failed($test, $fail);
    }
813505
public function _before(TestInterface $test)
    {
        /** @noinspection PhpIncludeInspection */
        $application = require $this->bootstrapFile;
        if (!$application instanceof Injectable) {
            throw new ModuleException(__CLASS__, 'Bootstrap must return \Phalcon\Di\Injectable object');
        }

        $this->di = $application->getDI();

        Di::reset();
        Di::setDefault($this->di);

        if ($this->di->has('session')) {
            // Destroy existing sessions of previous tests
            $this->di['session'] = $this->di->get($this->config['session']);
        }

        if ($this->di->has('cookies')) {
            $this->di['cookies']->useEncryption(false);
        }

        if ($this->config['cleanup'] && $this->di->has('db')) {
            if ($this->config['savepoints']) {
                $this->di['db']->setNestedTransactionsWithSavepoints(true);
            }
            $this->di['db']->begin();
            $this->debugSection('Database', 'Transaction started');
        }

        // localize
        $bootstrap = $this->bootstrapFile;
        $this->client->setApplication(function () use ($bootstrap) {
            $currentDi = Di::getDefault();
            /** @noinspection PhpIncludeInspection */
            $application = require $bootstrap;
            $di = $application->getDI();
            if ($currentDi->has('db')) {
                $di['db'] = $currentDi['db'];
            }
            if ($currentDi->has('session')) {
                $di['session'] = $currentDi['session'];
            }
            if ($di->has('cookies')) {
                $di['cookies']->useEncryption(false);
            }
            return $application;
        });
    }
1314120
public function connect($timeout = self::TIMEOUT, $test = false)
    {
        Argument::i()
            ->test(1, 'int')
            ->test(2, 'bool');

        $host = $this->host;

        if ($this->ssl) {
            $host = 'ssl://' . $host;
        } else {
            $host = 'tcp://' . $host;
        }

        $errno  =  0;
        $errstr = '';
        $this->socket = @stream_socket_client($host.':'.$this->port, $errno, $errstr, $timeout);

        if (!$this->socket || strlen($errstr) > 0 || $errno > 0) {
            //throw exception
            Exception::i()
                ->setMessage(Exception::SERVER_ERROR)
                ->addVariable($host.':'.$this->port)
                ->trigger();
        }

        $this->receive();

        if (!$this->call('EHLO '.$_SERVER['HTTP_HOST'], 250)
        && !$this->call('HELO '.$_SERVER['HTTP_HOST'], 250)) {
            $this->disconnect();
            //throw exception
            Exception::i()
                ->setMessage(Exception::SERVER_ERROR)
                ->addVariable($host.':'.$this->port)
                ->trigger();
        }

        if ($this->tls && !$this->call('STARTTLS', 220, 250)) {
            if (!stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
                $this->disconnect();
                //throw exception
                Exception::i()
                    ->setMessage(Exception::TLS_ERROR)
                    ->addVariable($host.':'.$this->port)
                    ->trigger();
            }

            if (!$this->call('EHLO '.$_SERVER['HTTP_HOST'], 250)
            && !$this->call('HELO '.$_SERVER['HTTP_HOST'], 250)) {
                $this->disconnect();
                //throw exception
                Exception::i()
                    ->setMessage(Exception::SERVER_ERROR)
                    ->addVariable($host.':'.$this->port)
                    ->trigger();
            }
        }

        if ($test) {
            $this->disconnect();
            return $this;
        }

        //login
        if (!$this->call('AUTH LOGIN', 250, 334)) {
            $this->disconnect();
            //throw exception
            Exception::i(Exception::LOGIN_ERROR)->trigger();
        }

        if (!$this->call(base64_encode($this->username), 334)) {
            $this->disconnect();
            //throw exception
            Exception::i()->setMessage(Exception::LOGIN_ERROR);
        }

        if (!$this->call(base64_encode($this->password), 235, 334)) {
            $this->disconnect();
            //throw exception
            Exception::i()->setMessage(Exception::LOGIN_ERROR);
        }

        return $this;
    }
544051
public function failed($e)
    {
        $this->prepareData();

        $handler = Container::getInstance()->make($this->class);

        $parameters = array_merge($this->data, [$e]);

        if (method_exists($handler, 'failed')) {
            call_user_func_array([$handler, 'failed'], $parameters);
        }
    }
1153951
function (test) {
        test.iteration = 0;

        removeSelector(test.selector, test.cfg.incremental);
        log(test);

        test.start = +(new Date());
        executeAction(test);
    }
945997
public function _after(TestInterface $test)
    {
        $this->debugSection('ComposerProject', 'Deleting temporary directory...');

        $this->filesystem->deleteDir($this->tmpProjectDir);

        $this->debugSection('ComposerProject', 'Deleted temporary directory');
    }
973931
function () {
                this.$Test._endTest.call(this);
                this.checkExpectedEventListEnd();
                this.resetClassOverrides();
                this.assertLogsEmpty(false, false);
                this._assertCount = 0;
                this._currentTestName = '';

                this._isFinished = true;

                this.$raiseEvent({
                    name : "end",
                    testObject : this,
                    testClass : this.$classpath,
                    nbrOfAsserts : this._totalAssertCount
                });
            }
315151
public function printFeedback(ExecutableTest $test)
    {
        try {
            $reader = new Reader($test->getTempFile());
        } catch (\InvalidArgumentException $e) {
            throw new \RuntimeException(sprintf(
                "%s\n" .
                "The process: %s\n" .
                "This means a PHPUnit process was unable to run \"%s\"\n",
                $e->getMessage(),
                $test->getLastCommand(),
                $test->getPath()
            ));
        }
        $this->results->addReader($reader);
        $this->processReaderFeedback($reader, $test->getTestCount());
        $this->printTestWarnings($test);
    }
485230
public function addFailure(Test $test, AssertionFailedError $failure, float $time): void
    {
        if ($test instanceof TestCase and $test->is_driver_active() and $test->driver()->is_page_active()) {
            $this->save_driver_content(
                $test->driver(),
                \get_class($test).'_'.$test->getName(false),
                $failure->getMessage()
            );
        }
    }
1195086
public function result(string $testName, int $result, string $message): void
	{
		$outputs = [
			Test::PASSED => Dumper::color('green', '✔ ' . $testName),
			Test::SKIPPED => Dumper::color('olive', 's ' . $testName) . '(' . $message . ')',
			Test::FAILED => Dumper::color('red', '✖ ' . $testName) . "\n" . $this->indent($message, 3) . "\n",
		];
		echo $this->indent($outputs[$result], 2) . PHP_EOL;
	}
1026866
public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
    {
        $message = 'raised an error';
        $this->write(
            $this->colors ? Coloring::magenta($message)
                          : $message
        );

        parent::addError($test, $e, $time);
    }
257649
public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
    {
        if (!$this->colors) {
            parent::addFailure($test, $e, $time);

            return;
        }

        $this->writeProgress(Coloring::red('F'));
        $this->lastTestFailed = true;
    }
96913
public function addError(Test $test, \Throwable $exception, float $time): void
    {
        $this->writeCase(
            self::STATUS_ERROR,
            $time,
            $this->getStackTrace($exception),
            TestFailure::exceptionToString($exception),
            $test
        );

        $this->currentTestPass = false;
    }
164297
public function dontSeeTimeIsInSecs($time, $seconds) {
        \PHPUnit_Framework_Assert::assertNotEquals($seconds, $this->_GetNow()->diffInSeconds($this->_ParseDate($time), false));
    }
1351258
@Deprecated
    protected Statement withPotentialTimeout(FrameworkMethod method,
            Object test, Statement next) {
        long timeout = getTimeout(method.getAnnotation(Test.class));
        if (timeout <= 0) {
            return next;
        }
        return FailOnTimeout.builder()
               .withTimeout(timeout, TimeUnit.MILLISECONDS)
               .build(next);
    }
473155
public function isEnqueued($test)
    {
        return
            $test->state == Constants::STATE_QUEUED
            &&
            QueueModel::where('test_id', $test->id)->first();
    }