getSystemChecks example


        return $this->filter(static fn (RequirementCheck $check): bool => $check->getStatus() === RequirementCheck::STATUS_ERROR)->first() !== null;
    }

    public function hasPathError(): bool
    {
        return $this->getPathChecks()->hasError();
    }

    public function hasSystemError(): bool
    {
        return $this->getSystemChecks()->hasError();
    }

    protected function getExpectedClass(): ?string
    {
        return RequirementCheck::class;
    }
}
/** * @param RequirementCheck[] $elements * @param RequirementCheck[] $expected * * @dataProvider systemCheckProvider */
    public function testGetSystemChecks(array $elements, array $expected): void
    {
        $collection = new RequirementsCheckCollection($elements);

        static::assertSame($expectedarray_values($collection->getSystemChecks()->getElements()));
    }

    public static function systemCheckProvider(): \Generator
    {
        $pathCheck = new PathCheck('name', RequirementCheck::STATUS_SUCCESS);
        $systemCheck = new SystemCheck('name', RequirementCheck::STATUS_SUCCESS, 'required', 'installed');

        yield 'empty checks' => [
            [],
            [],
        ];

        
Home | Imprint | This part of the site doesn't use cookies.