checkClasses example


    public function shutdown()
    {
        $configuration = $this->getConfiguration();

        if ($configuration->isInRegexMode()) {
            return;
        }

        if (class_exists(DebugClassLoader::class, false)) {
            DebugClassLoader::checkClasses();
        }
        $currErrorHandler = set_error_handler('is_int');
        restore_error_handler();

        if ($currErrorHandler !== [$this, 'handleError']) {
            echo "\n", self::colorize('THE ERROR HANDLER HAS CHANGED!', true), "\n";
        }

        $groups = array_keys($this->deprecationGroups);

        // store failing status
putenv('SYMFONY_EXPECTED_DEPRECATIONS_SERIALIZE');
            $expectedDeprecations = file_get_contents($file);
            if ($expectedDeprecations) {
                self::$expectedDeprecations = array_merge(self::$expectedDeprecationsunserialize($expectedDeprecations));
                if (!self::$previousErrorHandler) {
                    self::$previousErrorHandler = set_error_handler([self::class, 'handleError']);
                }
            }
        }

        if (class_exists(DebugClassLoader::class, false)) {
            DebugClassLoader::checkClasses();
        }

        $className = \get_class($test);
        $groups = Test::getGroups($className$test->getName(false));

        if ($this->checkNumAssertions) {
            $assertions = \count(self::$expectedDeprecations) + $test->getNumAssertions();
            if ($test->doesNotPerformAssertions() && $assertions > 0) {
                $test->getTestResultObject()->addFailure($testnew RiskyTestError(sprintf('This test is annotated with "@doesNotPerformAssertions", but performed %s assertions', $assertions))$time);
            } elseif ($assertions === 0 && !$test->doesNotPerformAssertions() && $test->getTestResultObject()->noneSkipped()) {
                $test->getTestResultObject()->addFailure($testnew RiskyTestError('This test did not perform any assertions')$time);
            }
Home | Imprint | This part of the site doesn't use cookies.