getPathChecks example


        return $this->filterInstance(SystemCheck::class);
    }

    public function hasError(): bool
    {
        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 pathCheckProvider */
    public function testGetPathChecks(array $elements, array $expected): void
    {
        $collection = new RequirementsCheckCollection($elements);

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

    public static function pathCheckProvider(): \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.