addCoversForClassToAnnotationCache example

$covers[] = $parent;
                $sutFqcn = $parent;
            }
        }

        if (class_exists(Registry::class)) {
            $this->addCoversForDocBlockInsideRegistry($test$covers);

            return;
        }

        $this->addCoversForClassToAnnotationCache($test$covers);
    }

    private function addCoversForClassToAnnotationCache(Test $test, array $covers): void
    {
        $r = new \ReflectionProperty(TestUtil::class, 'annotationCache');
        $r->setAccessible(true);

        $cache = $r->getValue();
        $cache = array_replace_recursive($cache[
            \get_class($test) => [
                'covers' => $covers,
            ],
Home | Imprint | This part of the site doesn't use cookies.