toHaveCount(35) ->toContain('circle', 'cookie-9', 'clover-4', 'soft-burst', 'pixel-triangle', 'heart'); }); it('draws every shape as one path in the text colour, filling a 100-unit box', function () { foreach (SvgFile::shapeNames() as $shape) { $svg = file_get_contents(__DIR__."/../../../resources/svg/shapes/{$shape}.svg"); expect($svg)->toMatch('#^\n$#'); preg_match_all('/-?\d+(?:\.\d+)?/', str($svg)->after(' d="')->before('"')->toString(), $numbers); $xs = array_map('floatval', array_filter($numbers[0], fn ($key) => $key % 2 === 0, ARRAY_FILTER_USE_KEY)); $ys = array_map('floatval', array_filter($numbers[0], fn ($key) => $key % 2 === 1, ARRAY_FILTER_USE_KEY)); expect(min([...$xs, ...$ys]))->toBeGreaterThanOrEqual(0) ->and(max([...$xs, ...$ys]))->toBeLessThanOrEqual(100) ->and(max(max($xs) - min($xs), max($ys) - min($ys)))->toBeGreaterThanOrEqual(96, "{$shape} does not fill its box"); } }); it('renders a shape hidden from assistive tech', function () { $this->blade('') ->assertSee('