blade(''); preg_match('/anchor-name: (--material-tooltip-[a-z0-9]+)/', $html, $anchor); expect($anchor)->not->toBeEmpty() ->and($html) ->toContain('') ->toContain('popover="manual"') ->toContain('x-data="materialTooltip"') ->toContain("position-anchor: {$anchor[1]}") ->toContain('bg-inverse-surface') ->toContain('[position-area:top]'); }); it('places the bubble on the side asked for, flipping when there is no room', function (string $side, string $classes) { expect((string) $this->blade("x"))->toContain($classes); })->with([ 'bottom' => ['bottom', '[position-area:bottom] [position-try-fallbacks:flip-block]'], 'left' => ['left', '[position-area:left] [position-try-fallbacks:flip-inline]'], 'right' => ['right', '[position-area:right] [position-try-fallbacks:flip-inline]'], ]); it('escapes its text', function () { $this->blade('x') ->assertSee('<b>bold</b>', false); });