blade($blade); preg_match('/<([a-z]+)((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>/', ltrim($html), $root); expect($root[2] ?? '') ->toContain('class="caller-class') ->toContain('--caller-width: 192px') ->and(substr_count($html, 'caller-class'))->toBe(1, 'the class lands more than once') ->and(substr_count($html, '--caller-width'))->toBe(1, 'the style lands more than once'); })->with([ 'input' => '', 'password' => '', 'textarea' => '', 'textarea, fixed height' => '', 'select' => '', 'file' => '', 'datepicker' => '', 'timepicker' => '', 'choices' => '', 'search' => '', 'group' => '', 'split button' => '', 'checkbox' => '', 'radio' => '', 'toggle' => '', 'slider' => '', ]); it('keeps a textarea\'s own row count beside a caller\'s style', function () { $html = (string) $this->blade(''); // A second style attribute on the