diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae17fd6..2aebbfa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.1.1 under development +- Enh #306: Raise `yiisoft/html` version to `^3.13 || ^4.0` (@vjik) - Enh #305: Add `tabIndex()` method to `Button` widget (@Mister-42) ## 1.1.0 March 06, 2026 diff --git a/composer.json b/composer.json index b57f4dfc..83ba2570 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require": { "php": "8.1 - 8.5", - "yiisoft/html": "^3.0", + "yiisoft/html": "^3.13 || ^4.0", "yiisoft/widget": "^2.0" }, "require-dev": { diff --git a/src/Accordion.php b/src/Accordion.php index 5578adbd..594e0304 100644 --- a/src/Accordion.php +++ b/src/Accordion.php @@ -520,7 +520,7 @@ public function render(): string $id = $this->getId(); - return Div::tag() + return (new Div()) ->addAttributes($attributes) ->addClass(self::NAME, $classes, ...$this->cssClasses) ->addContent("\n", $this->renderItems($id), "\n") @@ -569,14 +569,14 @@ private function renderBody(AccordionItem $accordionItem, string $parentId, stri unset($bodyAttributes['class'], $collapseAttributes['class']); - return Div::tag() + return (new Div()) ->attribute('data-bs-parent', $this->alwaysOpen ? null : '#' . $parentId) ->addAttributes($collapseAttributes) ->addClass(self::CLASS_COLLAPSE, $accordionItem->isActive() ? 'show' : null, $classesCollapseAttributes) ->id($collapseId) ->addContent( "\n", - Div::tag() + (new Div()) ->addAttributes($bodyAttributes) ->addClass(self::CLASS_BODY, $classesBodyAttributes) ->addContent("\n", $accordionItem->getBody(), "\n") @@ -658,7 +658,7 @@ private function renderItem(AccordionItem $accordionItem, string $parentId): str /** @psalm-var non-empty-string $collapseId */ $collapseId = $accordionItem->getId(); - return Div::tag()->addClass(self::CLASS_ITEM) + return (new Div())->addClass(self::CLASS_ITEM) ->addContent( "\n", $this->renderHeader($accordionItem, $collapseId), diff --git a/src/Alert.php b/src/Alert.php index a926895a..388279af 100644 --- a/src/Alert.php +++ b/src/Alert.php @@ -567,7 +567,7 @@ public function render(): string $content = preg_replace("/\n{2}/", "\n", $content) ?? ''; - return Div::tag()->addAttributes($attributes)->content($content)->encode(false)->id($this->getId())->render(); + return (new Div())->addAttributes($attributes)->content($content)->encode(false)->id($this->getId())->render(); } /** diff --git a/src/Breadcrumbs.php b/src/Breadcrumbs.php index db20b6e8..d4085b6a 100644 --- a/src/Breadcrumbs.php +++ b/src/Breadcrumbs.php @@ -407,7 +407,7 @@ public function render(): string } - return Nav::tag() + return (new Nav()) ->addAttributes($attributes) ->addClass(...$this->cssClasses) ->content("\n", $this->renderList(), "\n") @@ -493,7 +493,7 @@ private function renderItem(BreadcrumbLink $breadcrumbLink): string $itemsAttributes['aria-current'] = 'page'; } - return Li::tag() + return (new Li()) ->addAttributes($itemsAttributes) ->addClass( self::ITEM_NAME, @@ -519,7 +519,7 @@ private function renderLink(BreadcrumbLink $breadcrumbLink): string return match ($url) { null => $label, - default => A::tag() + default => (new A()) ->attributes($this->linkAttributes) ->addAttributes($breadcrumbLink->getAttributes()) ->content($label) diff --git a/src/Button.php b/src/Button.php index bc8c3ffe..29c774fe 100644 --- a/src/Button.php +++ b/src/Button.php @@ -528,7 +528,7 @@ public function type(ButtonType $type): self { $new = clone $this; $new->tag = match ($type) { - ButtonType::LINK => A::tag(), + ButtonType::LINK => (new A()), ButtonType::RESET => ButtonTag::reset(''), ButtonType::RESET_INPUT => Input::resetButton(), ButtonType::SUBMIT => ButtonTag::submit(''), @@ -584,7 +584,7 @@ public function render(): string { $attributes = $this->attributes; $classes = $attributes['class'] ?? null; - $tag = $this->tag ?? ButtonTag::tag()->button(''); + $tag = $this->tag ?? (new ButtonTag())->button(''); unset($attributes['class'], $attributes['id']); diff --git a/src/ButtonGroup.php b/src/ButtonGroup.php index 94e353a7..ef5f8a41 100644 --- a/src/ButtonGroup.php +++ b/src/ButtonGroup.php @@ -299,7 +299,7 @@ public function render(): string return ''; } - return Div::tag() + return (new Div()) ->attributes($attributes) ->attribute('role', 'group') ->addClass( diff --git a/src/ButtonToolbar.php b/src/ButtonToolbar.php index 6fe472e2..42c72ed9 100644 --- a/src/ButtonToolbar.php +++ b/src/ButtonToolbar.php @@ -274,7 +274,7 @@ public function render(): string return ''; } - return Div::tag() + return (new Div()) ->attributes($attributes) ->attribute('role', 'toolbar') ->addClass( diff --git a/src/Carousel.php b/src/Carousel.php index 0608616e..63d7bf32 100644 --- a/src/Carousel.php +++ b/src/Carousel.php @@ -26,9 +26,9 @@ * id('carouselExample') * ->items( - * CarouselItem::to(Img::tag()->alt('First slide')->src('image-1.jpg'), active: true), - * CarouselItem::to(Img::tag()->alt('Second slide')->src('image-2.jpg')), - * CarouselItem::to(Img::tag()->alt('Third slide')->src('image-3.jpg')), + * CarouselItem::to((new Img())->alt('First slide')->src('image-1.jpg'), active: true), + * CarouselItem::to((new Img())->alt('Second slide')->src('image-2.jpg')), + * CarouselItem::to((new Img())->alt('Third slide')->src('image-3.jpg')), * ) * ?> * ``` @@ -409,9 +409,9 @@ public function id(bool|string $id): self * Example usage: * ```php * $carousel->items( - * CarouselItem::to(Img::tag()->alt('First slide')->src('image-1.jpg'), active: true), - * CarouselItem::to(Img::tag()->alt('Second slide')->src('image-2.jpg')), - * CarouselItem::to(Img::tag()->alt('Third slide')->src('image-3.jpg')), + * CarouselItem::to((new Img())->alt('First slide')->src('image-1.jpg'), active: true), + * CarouselItem::to((new Img())->alt('Second slide')->src('image-2.jpg')), + * CarouselItem::to((new Img())->alt('Third slide')->src('image-3.jpg')), * ); */ public function items(CarouselItem ...$items): self @@ -498,7 +498,7 @@ public function render(): string Html::addCssClass($attributes, [self::NAME, self::CLASS_SLIDE, $classes, ...$this->cssClasses]); - return Div::tag() + return (new Div()) ->attributes($attributes) ->addContent( "\n", @@ -549,12 +549,12 @@ private function renderControlNext(string $id): string ->addClass(self::CLASS_CAROUSEL_CONTROL_NEXT) ->addContent( "\n", - Span::tag() + (new Span()) ->addAttributes(['aria-hidden' => 'true']) ->addClass(self::CLASS_CAROUSEL_CONTROL_NEXT_ICON) ->render(), "\n", - Span::tag()->addClass('visually-hidden')->addContent($this->controlNextLabel)->render(), + (new Span())->addClass('visually-hidden')->addContent($this->controlNextLabel)->render(), "\n", ) ->encode(false) @@ -580,12 +580,12 @@ private function renderControlPrevious(string $id): string ->addClass(self::CLASS_CAROUSEL_CONTROL_PREV) ->addContent( "\n", - Span::tag() + (new Span()) ->addAttributes(['aria-hidden' => 'true']) ->addClass(self::CLASS_CAROUSEL_CONTROL_PREV_ICON) ->render(), "\n", - Span::tag()->addClass('visually-hidden')->addContent($this->controlPreviousLabel)->render(), + (new Span())->addClass('visually-hidden')->addContent($this->controlPreviousLabel)->render(), "\n", ) ->encode(false) @@ -643,7 +643,7 @@ private function renderItem(CarouselItem $carouselItem, bool $active): string ); } - $captionContainerTag = Div::tag() + $captionContainerTag = (new Div()) ->addClass(self::CLASS_CAROUSEL_CAPTION) ->addContent( "\n", @@ -658,7 +658,7 @@ private function renderItem(CarouselItem $carouselItem, bool $active): string ) . "\n"; } - return Div::tag() + return (new Div()) ->addClass( self::CLASS_CAROUSEL_ITEM, $carouselItem->isActive() || $active ? 'active' : null, @@ -704,7 +704,7 @@ private function renderItems(string $id): string } if ($this->showIndicators) { - $renderIndicators = Div::tag() + $renderIndicators = (new Div()) ->addClass(self::CLASS_CAROUSEL_INDICATORS) ->addContent("\n" . implode("\n", $indicators) . "\n") ->encode(false) @@ -712,7 +712,7 @@ private function renderItems(string $id): string } return $renderIndicators - . Div::tag() + . (new Div()) ->addClass(self::CLASS_CAROUSEL_INNER) ->addContent("\n" . implode("\n", $items) . "\n") ->encode(false) diff --git a/src/Collapse.php b/src/Collapse.php index 895d7a4f..8e1b69bd 100644 --- a/src/Collapse.php +++ b/src/Collapse.php @@ -357,12 +357,12 @@ public function render(): string foreach ($this->items as $item) { if ($item->getContent() !== '') { - $collapseDiv = Div::tag() + $collapseDiv = (new Div()) ->addClass(self::NAME, ...$this->cssClasses) ->addAttributes($this->attributes) ->addContent( "\n", - Div::tag() + (new Div()) ->addAttributes($this->cardBodyAttributes) ->addClass(self::CARD, self::CARD_BODY) ->addContent( @@ -378,7 +378,7 @@ public function render(): string $collapseDiv = $collapseDiv->addClass(self::COLLAPSE_MULTIPLE); if ($item->getTogglerMultiple() === false) { - $collapse[] = Div::tag()->addClass('col')->addContent("\n", $collapseDiv, "\n"); + $collapse[] = (new Div())->addClass('col')->addContent("\n", $collapseDiv, "\n"); } } else { $collapse[] = $collapseDiv; @@ -403,7 +403,7 @@ private function renderCollapse(array $collapse): string $collapseContent = implode("\n", $collapse); return $this->container - ? Div::tag() + ? (new Div()) ->addAttributes($this->containerAttributes) ->addContent("\n", $collapseContent, "\n") ->encode(false) diff --git a/src/Dropdown.php b/src/Dropdown.php index 0ad3e9a8..6530109c 100644 --- a/src/Dropdown.php +++ b/src/Dropdown.php @@ -492,7 +492,7 @@ public function theme(string $theme): self * Example usage: * ```php * $dropdown->toggler( - * Button::tag() + * (new Button()) * ->addAttributes( * [ * 'data-bs-toggle' => 'dropdown', @@ -773,7 +773,7 @@ public function render(): string $renderItems = $this->renderItems($togglerId); return match ($this->container) { - true => Div::tag() + true => (new Div()) ->addAttributes($attributes) ->addClass(...$containerClasses) ->addClass($classes) @@ -835,7 +835,7 @@ private function renderItem(DropdownItem $item): Li */ private function renderItemButton(DropdownItem $item): Li { - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent( "\n", @@ -856,11 +856,11 @@ private function renderItemButton(DropdownItem $item): Li */ private function renderItemDivider(DropdownItem $item): Li { - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent( "\n", - Hr::tag()->addAttributes($item->getItemAttributes())->addClass(self::DROPDOWN_ITEM_DIVIDER_CLASS), + (new Hr())->addAttributes($item->getItemAttributes())->addClass(self::DROPDOWN_ITEM_DIVIDER_CLASS), "\n", ); } @@ -874,7 +874,7 @@ private function renderItemDivider(DropdownItem $item): Li */ private function renderItemHeader(DropdownItem $item): Li { - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent( "\n", @@ -908,11 +908,11 @@ private function renderItemLink(DropdownItem $item): Li $itemAttributes['aria-disabled'] = 'true'; } - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent( "\n", - A::tag()->addAttributes($itemAttributes)->content($item->getContent())->url($item->getUrl()), + (new A())->addAttributes($itemAttributes)->content($item->getContent())->url($item->getUrl()), "\n", ); } @@ -926,7 +926,7 @@ private function renderItemLink(DropdownItem $item): Li */ private function renderListContentItem(DropdownItem $item): Li { - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent("\n", $item->getContent(), "\n") ->encode(false); @@ -941,11 +941,11 @@ private function renderListContentItem(DropdownItem $item): Li */ private function renderItemText(DropdownItem $item): Li { - return Li::tag() + return (new Li()) ->addAttributes($item->getAttributes()) ->addContent( "\n", - Span::tag() + (new Span()) ->addAttributes($item->getItemAttributes()) ->addClass(self::DROPDOWN_ITEM_TEXT_CLASS) ->content($item->getContent()) @@ -973,7 +973,7 @@ private function renderItems(?string $togglerId): string } } - $ulTag = Ul::tag() + $ulTag = (new Ul()) ->addAttributes(['aria-labelledby' => $togglerId]) ->addClass(self::DROPDOWN_LIST_CLASS, ...$this->alignmentClasses) ->items(...$items); @@ -998,7 +998,7 @@ private function renderToggler(?string $togglerId): string $togglerContent = match ($this->togglerSplit) { true => "\n" - . Span::tag() + . (new Span()) ->addContent($this->togglerContent) ->addClass(self::DROPDOWN_TOGGLER_SPAN_CLASS) ->render() @@ -1051,7 +1051,7 @@ private function renderToggler(?string $togglerId): string */ private function renderTogglerLink(array $togglerAttributes, string $togglerContent): string { - return A::tag() + return (new A()) ->addAttributes($togglerAttributes) ->attribute('role', 'button') ->attribute('data-bs-toggle', 'dropdown') @@ -1070,7 +1070,7 @@ private function renderTogglerLink(array $togglerAttributes, string $togglerCont private function renderTogglerSplit(): string { if ($this->togglerLink) { - return A::tag() + return (new A()) ->addAttributes(['role' => 'button']) ->addClass( self::DROPDOWN_TOGGLER_BUTTON_CLASS, diff --git a/src/Modal.php b/src/Modal.php index 3c6ce5b4..60d3283b 100644 --- a/src/Modal.php +++ b/src/Modal.php @@ -23,13 +23,13 @@ * * ```php * body(P::tag()->content('Modal body text goes here.')) + * ->body((new P())->content('Modal body text goes here.')) * ->footer( - * Button::tag() + * (new Button()) * ->addClass('btn btn-secondary') * ->attribute('data-bs-dismiss', 'modal') * ->content('Close'), - * Button::tag() + * (new Button()) * ->addClass('btn btn-primary') * ->content('Save changes'), * ) @@ -595,7 +595,7 @@ public function render(): string throw new InvalidArgumentException('Set the trigger button before rendering the modal.'); } - $modal = Div::tag() + $modal = (new Div()) ->addAttributes($attributes) ->addClass( self::NAME, @@ -639,7 +639,7 @@ private function renderBody(): string unset($bodyAttributes['class']); - return Div::tag() + return (new Div()) ->addAttributes($bodyAttributes) ->addClass( self::MODAL_BODY, @@ -662,7 +662,7 @@ private function renderContent(): string Html::addCssClass($contentAttributes, [self::MODAL_CONTENT, $contentClasses]); - return Div::tag() + return (new Div()) ->addAttributes($contentAttributes) ->addClass( self::MODAL_CONTENT, @@ -688,7 +688,7 @@ private function renderDialog(): string unset($dialogAttributes['class']); - return Div::tag() + return (new Div()) ->addAttributes($dialogAttributes) ->addClass( self::MODAL_DIALOG, @@ -712,7 +712,7 @@ private function renderHeader(): string unset($headerAttributes['class']); - return Div::tag() + return (new Div()) ->addAttributes($headerAttributes) ->addClass( self::MODAL_HEADER, @@ -735,7 +735,7 @@ private function renderFooter(): string unset($footerAttributes['class']); - return Div::tag() + return (new Div()) ->addAttributes($footerAttributes) ->addClass( self::MODAL_FOOTER, diff --git a/src/Nav.php b/src/Nav.php index bae6cf6f..c3e58ab8 100644 --- a/src/Nav.php +++ b/src/Nav.php @@ -486,7 +486,7 @@ public function render(): string } $html = $this->tag === '' - ? Ul::tag()->addAttributes($attributes)->id($id)->items(...$this->renderItems())->render() + ? (new Ul())->addAttributes($attributes)->id($id)->items(...$this->renderItems())->render() : Html::tag($this->tag) ->addAttributes($attributes) ->addContent("\n", implode("\n", $this->createLinks()), "\n") @@ -506,7 +506,7 @@ public function render(): string private function createLink(NavLink $item): A|Button { $attributes = $item->getUrlAttributes(); - $tag = A::tag()->href($item->getUrl()); + $tag = (new A())->href($item->getUrl()); Html::addCssClass($attributes, [self::NAV_LINK_CLASS]); @@ -524,7 +524,7 @@ private function createLink(NavLink $item): A|Button } if ($item->hasContent()) { - $tag = Button::tag()->type('button'); + $tag = (new Button())->type('button'); $paneId = $item->getId(); $attributes['id'] = $paneId; @@ -672,7 +672,7 @@ private function renderItemsDropdown(Dropdown $items): Li $togglerClasses[] = self::NAV_LINK_ACTIVE_CLASS; } - return Li::tag() + return (new Li()) ->addClass(...$this->dropdownCssClasses, ...$dropDownItems->getCssClasses()) ->addContent( "\n", @@ -703,7 +703,7 @@ private function renderNavItem(NavLink $item): Li $attributes['role'] = 'presentation'; } - return Li::tag()->addAttributes($attributes)->addContent("\n", $this->createLink($item), "\n"); + return (new Li())->addAttributes($attributes)->addContent("\n", $this->createLink($item), "\n"); } /** @@ -730,7 +730,7 @@ private function renderTabContent(): string Html::addCssClass($paneAttributes, ['widget' => 'tab-content']); return "\n" - . Div::tag() + . (new Div()) ->addAttributes($paneAttributes) ->content("\n" . implode("\n", $panes) . "\n") ->encode(false) @@ -764,7 +764,7 @@ private function renderTabPane(NavLink $item): string ); } - return Div::tag() + return (new Div()) ->attributes($paneAttributes) ->addAttributes( [ diff --git a/src/NavBar.php b/src/NavBar.php index 06cc58a8..b00f0e87 100644 --- a/src/NavBar.php +++ b/src/NavBar.php @@ -345,7 +345,7 @@ public function brandAttributes(array $attributes): self * $navBar->brandImage('path/to/image.png'); * * // or - * $navBar->brandImage(Img::tag()->src('path/to/image.png')); + * $navBar->brandImage((new Img())->src('path/to/image.png')); * ``` */ public function brandImage(string|Stringable $image): self @@ -839,7 +839,7 @@ private function renderToggler(string $id): string $togglerTag = Button::button('') ->addAttributes($togglerAttributes) ->addClass(self::NAV_TOGGLE, $togglerClasses) - ->addContent("\n", Span::tag()->addClass(self::NAV_TOGGLE_ICON), "\n") + ->addContent("\n", (new Span())->addClass(self::NAV_TOGGLE_ICON), "\n") ->encode(false); if (array_key_exists('data-bs-toggle', $togglerAttributes) === false) { diff --git a/src/Offcanvas.php b/src/Offcanvas.php index 0797ce6a..709d3e5d 100644 --- a/src/Offcanvas.php +++ b/src/Offcanvas.php @@ -696,13 +696,13 @@ private function renderHeader(string $id): string Html::addCssClass($titleAttributes, [self::TITLE_CLASS]); - return Div::tag() + return (new Div()) ->attributes($headerAttributes) ->content( "\n", Html::tag('h5', $this->title, $titleAttributes), "\n", - Button::tag() + (new Button()) ->attributes( [ 'aria-label' => 'Close', diff --git a/src/Progress.php b/src/Progress.php index ac75bae9..79885f54 100644 --- a/src/Progress.php +++ b/src/Progress.php @@ -452,7 +452,7 @@ public function render(): string $attributes['style'] = 'width: ' . $this->percent . '%'; } - return Div::tag() + return (new Div()) ->attributes($attributes) ->addClass( self::NAME, @@ -505,7 +505,7 @@ private function renderBar(): string $barAttributes['style'] = 'width: ' . $this->percent . '%'; } - $renderBar = Div::tag() + $renderBar = (new Div()) ->attributes($barAttributes) ->addClass(self::PROGRESS_BAR, ...$this->barClasses) ->addClass($barClasses) diff --git a/src/ProgressStack.php b/src/ProgressStack.php index 2f71c490..b9737f53 100644 --- a/src/ProgressStack.php +++ b/src/ProgressStack.php @@ -246,7 +246,7 @@ public function render(): string $content .= $bar->stacked()->render() . "\n"; } - return Div::tag() + return (new Div()) ->attributes($attributes) ->addClass( self::PROGRESS_STACKED, diff --git a/src/Toast.php b/src/Toast.php index 5dc3c517..8b089e93 100644 --- a/src/Toast.php +++ b/src/Toast.php @@ -294,7 +294,7 @@ public function body(string|Stringable $content, array $attributes = [], BackedE { $new = clone $this; $new->body = is_string($content) - ? Div::tag() + ? (new Div()) ->addAttributes($attributes) ->addClass( self::TOAST_BODY, @@ -482,7 +482,7 @@ public function image(string|Stringable $content, string $alt = '', array $attri { $new = clone $this; $new->image = is_string($content) - ? Img::tag()->addAttributes($attributes)->alt($alt)->src($content)->render() + ? (new Img())->addAttributes($attributes)->alt($alt)->src($content)->render() : (string) $content; return $new; @@ -517,7 +517,7 @@ public function time(string|Stringable $content, array $attributes = [], BackedE { $new = clone $this; $new->time = is_string($content) - ? Small::tag()->addAttributes($attributes)->addClass(...$class)->content($content)->render() + ? (new Small())->addAttributes($attributes)->addClass(...$class)->content($content)->render() : (string) $content; return $new; @@ -552,7 +552,7 @@ public function title(string|Stringable $content, array $attributes = [], Backed { $new = clone $this; $new->title = is_string($content) - ? Strong::tag() + ? (new Strong()) ->addAttributes($attributes) ->addClass( self::TOAST_TITLE_HEADER, @@ -606,7 +606,7 @@ public function render(): string } return match ($this->container) { - true => $this->triggerButton . Div::tag() + true => $this->triggerButton . (new Div()) ->addClass(self::TOAST_CONTAINER) ->content( "\n", @@ -645,7 +645,7 @@ private function renderCloseButton(): string $closeButtonAttributes = $this->closeButtonAttributes; $closeButtonClasses = $closeButtonAttributes['class'] ?? null; - $closeButtonTag = Button::tag() + $closeButtonTag = (new Button()) ->addAttributes($closeButtonAttributes) ->addClass(self::CLASS_CLOSE_BUTTON, $closeButtonClasses) ->content($this->closeButton) @@ -691,7 +691,7 @@ private function renderHeader(): string return ''; } - return Div::tag() + return (new Div()) ->addAttributes($headerAttributes) ->addClass( self::TOAST_HEADER, @@ -728,7 +728,7 @@ private function renderToast(): string $content = preg_replace("/\n{2}/", "\n", $content) ?? ''; - return Div::tag() + return (new Div()) ->addAttributes($attributes) ->addClass( self::NAME, diff --git a/tests/AccordionTest.php b/tests/AccordionTest.php index a23be51b..5dc6fe48 100644 --- a/tests/AccordionTest.php +++ b/tests/AccordionTest.php @@ -22,14 +22,14 @@ public function testAddAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -58,14 +58,14 @@ public function testAddClass(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -78,14 +78,14 @@ public function testAddClass(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -106,14 +106,14 @@ public function testAddCssStyle(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -126,14 +126,14 @@ public function testAddCssStyle(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -154,14 +154,14 @@ public function testAddCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -174,14 +174,14 @@ public function testAddCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -197,14 +197,14 @@ public function testAddTogglerAttribute(): void { Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -231,14 +231,14 @@ public function testAddTogglerClass(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -251,14 +251,14 @@ public function testAddTogglerClass(): void Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -279,14 +279,14 @@ public function testAddTogglerCssStyle(): void Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -299,14 +299,14 @@ public function testAddTogglerCssStyle(): void Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -327,14 +327,14 @@ public function testAddTogglerCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -347,14 +347,14 @@ public function testAddTogglerCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -370,14 +370,14 @@ public function testAttribute(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -399,14 +399,14 @@ public function testAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -431,14 +431,14 @@ public function testAlwaysOpen(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -450,7 +450,7 @@ public function testAlwaysOpen(): void Accordion Item #2 -
+
This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -462,7 +462,7 @@ public function testAlwaysOpen(): void Accordion Item #3 -
+
This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -514,14 +514,14 @@ public function testBodyAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -543,14 +543,14 @@ public function testClass(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -573,14 +573,14 @@ public function testCollapseAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -605,14 +605,14 @@ public function testFlush(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -624,7 +624,7 @@ public function testFlush(): void Accordion Item #2 -
+
This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -636,7 +636,7 @@ public function testFlush(): void Accordion Item #3 -
+
This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -690,14 +690,14 @@ public function testFlushWithFalse(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -709,7 +709,7 @@ public function testFlushWithFalse(): void Accordion Item #2 -
+
This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -721,7 +721,7 @@ public function testFlushWithFalse(): void Accordion Item #3 -
+
This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -773,14 +773,14 @@ public function testHeaderAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -802,14 +802,14 @@ public function testHeaderTag(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -831,14 +831,14 @@ public function testId(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -866,7 +866,7 @@ public function testIdWithSetAttributes(): void Accordion Item #1 -
+
This is the first item's accordion body.
@@ -912,14 +912,14 @@ public function testItemsWithActive(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -931,7 +931,7 @@ public function testItemsWithActive(): void Accordion Item #2 -
+
This is the second item's accordion body.
@@ -962,14 +962,14 @@ public function testItemsWithMultipleActive(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -981,7 +981,7 @@ public function testItemsWithMultipleActive(): void Accordion Item #2 -
+
This is the second item's accordion body.
@@ -1013,14 +1013,14 @@ public function testItemsWithEncodeHeaderAndEncodeBody(): void { Assert::equalsWithoutLE( << +

-
+
<strong>This is the first item's accordion body.</strong>
@@ -1045,14 +1045,14 @@ public function testItemsWithEncodeHeaderAndEncodeBodyWithFalse(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1082,14 +1082,14 @@ public function testRender(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -1101,7 +1101,7 @@ public function testRender(): void Accordion Item #2 -
+
This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -1113,7 +1113,7 @@ public function testRender(): void Accordion Item #3 -
+
This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
@@ -1221,14 +1221,14 @@ public function testTogglerAttributes(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1250,14 +1250,14 @@ public function testTogglerAttributesWithAriaControls(): void { Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -1279,14 +1279,14 @@ public function testTogglerAttributesWithAriaControlsWithNull(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1308,14 +1308,14 @@ public function testTogglerAttributesWithAriaExpanded(): void { Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -1337,14 +1337,14 @@ public function testTogglerAttributesWithAriaExpandedNull(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1366,14 +1366,14 @@ public function testTogglerAttributesWithDataBsTarget(): void { Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -1395,14 +1395,14 @@ public function testTogglerAttributesWithDataBsTargetNull(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1424,14 +1424,14 @@ public function testTogglerAttributesWithDataBsToggle(): void { Assert::equalsWithoutLE( << +

-

-
+
This is the first item's accordion body.
@@ -1453,14 +1453,14 @@ public function testTogglerAttributesWithDataBsToggleNull(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
@@ -1482,14 +1482,14 @@ public function testTogglerTagName(): void { Assert::equalsWithoutLE( << +

-
+
This is the first item's accordion body.
diff --git a/tests/AlertTest.php b/tests/AlertTest.php index 99d7819b..b17f3b4d 100644 --- a/tests/AlertTest.php +++ b/tests/AlertTest.php @@ -26,7 +26,7 @@ public function testAddAttributes(): void { Assert::equalsWithoutLE( << + HTML, @@ -40,7 +40,7 @@ public function testAddClass(): void Assert::equalsWithoutLE( << + HTML, @@ -49,7 +49,7 @@ public function testAddClass(): void Assert::equalsWithoutLE( << + HTML, @@ -61,7 +61,7 @@ public function testAddCloseButtonAttribute(): void { Assert::equalsWithoutLE( << + @@ -85,7 +85,7 @@ public function testAddCloseButtonClass(): void Assert::equalsWithoutLE( << + @@ -95,7 +95,7 @@ public function testAddCloseButtonClass(): void Assert::equalsWithoutLE( << + @@ -114,7 +114,7 @@ public function testAddCloseButtonCssStyle(): void Assert::equalsWithoutLE( << + @@ -124,7 +124,7 @@ public function testAddCloseButtonCssStyle(): void Assert::equalsWithoutLE( << + @@ -143,7 +143,7 @@ public function testAddCloseButtonCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << + @@ -153,7 +153,7 @@ public function testAddCloseButtonCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << + @@ -168,7 +168,7 @@ public function testAddCssStyle(): void Assert::equalsWithoutLE( << + HTML, @@ -177,7 +177,7 @@ public function testAddCssStyle(): void Assert::equalsWithoutLE( << + HTML, @@ -191,7 +191,7 @@ public function testAddCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << + HTML, @@ -200,7 +200,7 @@ public function testAddCssStyleWithOverwriteFalse(): void Assert::equalsWithoutLE( << + HTML, @@ -212,7 +212,7 @@ public function testAttribute(): void { Assert::equalsWithoutLE( << + HTML, @@ -224,7 +224,7 @@ public function testAttributes(): void { Assert::equalsWithoutLE( << + HTML, @@ -236,7 +236,7 @@ public function testBodyWithEncodeFalse(): void { Assert::equalsWithoutLE( << + HTML, @@ -248,7 +248,7 @@ public function testBodyWithEncodeTrue(): void { Assert::equalsWithoutLE( << + HTML, @@ -260,7 +260,7 @@ public function testClass(): void { Assert::equalsWithoutLE( << + HTML, @@ -280,7 +280,7 @@ public function testDismissable(): void { Assert::equalsWithoutLE( << + @@ -298,7 +298,7 @@ public function testDismissableWithCloseButtonAttributes(): void { Assert::equalsWithoutLE( << + @@ -316,7 +316,7 @@ public function testDimissableWithCloseButtonWithAriaLabelAttributes(): void { Assert::equalsWithoutLE( << + @@ -334,7 +334,7 @@ public function testDimissableWithCloseButtonWithAriaLabelNullAttributes(): void { Assert::equalsWithoutLE( << + @@ -352,7 +352,7 @@ public function testDimissableWithCloseButtonWithDataBsDismissAttributes(): void { Assert::equalsWithoutLE( << + @@ -370,7 +370,7 @@ public function testDimissableWithCloseButtonWithDataBsDismissNullAttributes(): { Assert::equalsWithoutLE( << + @@ -388,7 +388,7 @@ public function testDimissableWithCloseButtonWithLabel(): void { Assert::equalsWithoutLE( << + @@ -406,7 +406,7 @@ public function testDimissableWithCloseButtonWithTagName(): void { Assert::equalsWithoutLE( << + @@ -419,7 +419,7 @@ public function testHeader(): void { Assert::equalsWithoutLE( << + @@ -438,7 +438,7 @@ public function testHeaderWithEncodeFalse(): void { Assert::equalsWithoutLE( << + @@ -457,7 +457,7 @@ public function testHeaderWithEncodeTrue(): void { Assert::equalsWithoutLE( << + @@ -476,7 +476,7 @@ public function testId(): void { Assert::equalsWithoutLE( << + HTML, @@ -488,7 +488,7 @@ public function testIdWithEmpty(): void { Assert::equalsWithoutLE( << + HTML, @@ -500,7 +500,7 @@ public function testIdWithFalse(): void { Assert::equalsWithoutLE( << + HTML, @@ -512,7 +512,7 @@ public function testIdWithSetAttributes(): void { Assert::equalsWithoutLE( << + HTML, @@ -555,7 +555,7 @@ public function testRenderLink(): void { Assert::equalsWithoutLE( << + HTML, @@ -578,7 +578,7 @@ public function testRenderIcon(): void { Assert::equalsWithoutLE( << + @@ -601,7 +601,7 @@ public function testTemplateContent(): void { Assert::equalsWithoutLE( << + diff --git a/tests/BreadcrumbsTest.php b/tests/BreadcrumbsTest.php index a6df3a37..32e8ac36 100644 --- a/tests/BreadcrumbsTest.php +++ b/tests/BreadcrumbsTest.php @@ -26,7 +26,7 @@ public function testActive(): void @@ -66,7 +66,7 @@ public function testAddAttributes(): void @@ -98,10 +98,10 @@ public function testAddCssClass(): void Assert::equalsWithoutLE( << + @@ -111,10 +111,10 @@ public function testAddCssClass(): void Assert::equalsWithoutLE( << + @@ -140,7 +140,7 @@ public function testAddCssStyle(): void @@ -153,7 +153,7 @@ public function testAddCssStyle(): void @@ -179,7 +179,7 @@ public function testAddCssStyleWithOverwriteFalse(): void @@ -192,7 +192,7 @@ public function testAddCssStyleWithOverwriteFalse(): void @@ -209,7 +209,7 @@ public function testAriaLabel(): void HTML, @@ -233,7 +233,7 @@ public function testAttribute(): void HTML, @@ -257,7 +257,7 @@ public function testAttributes(): void HTML, @@ -277,11 +277,11 @@ public function testClass(): void { Assert::equalsWithoutLE( << + HTML, @@ -306,7 +306,7 @@ public function testEncodeLabel(): void HTML, @@ -329,7 +329,7 @@ public function testEncodeLabelWithFalseValue(): void HTML, @@ -355,7 +355,7 @@ public function testDivider(): void HTML, @@ -407,7 +407,7 @@ public function testItemActiveClass(): void HTML, @@ -431,7 +431,7 @@ public function testItemAttributes(): void HTML, @@ -455,7 +455,7 @@ public function testLinkAttributes(): void HTML, @@ -477,9 +477,9 @@ public function testLinksWithSetAttributes(): void << HTML, @@ -503,7 +503,7 @@ public function testListAttributes(): void HTML, @@ -524,10 +524,10 @@ public function testListId(): void Assert::equalsWithoutLE( << -