diff --git a/composer.json b/composer.json index 7513d55..e610206 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "require": { "php": ">=8.1", "composer/installers": "^2|^1.0.1", - "mediawiki/bootstrap": "^5.0" + "mediawiki/bootstrap": "^6.0" }, "require-dev": { "mediawiki/mediawiki-codesniffer": "46.0.0", @@ -58,5 +58,10 @@ "composer phpunit", "composer cs" ] + }, + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } } } diff --git a/docs/components.md b/docs/components.md index d02f2b0..36336f2 100644 --- a/docs/components.md +++ b/docs/components.md @@ -22,6 +22,8 @@ the following components are available to be used inside the wiki text: want to hide and show large amount of content. * **[Jumbotron](components/jumbotron.md)**: A jumbotron indicates a big box for calling extra attention to some special content or information. + _Bootstrap 5 removed `.jumbotron`; the parser function is retained, + now emitting BS5 utility classes for an equivalent look._ * **[Modal](components/modal.md)**: The Modal component is a dialog box/popup window that is displayed on top of the current page. * **[Popover](components/popover.md)**: The Popover component produces a diff --git a/docs/components/accordion.md b/docs/components/accordion.md index ca1ffdd..78d1c21 100644 --- a/docs/components/accordion.md +++ b/docs/components/accordion.md @@ -40,6 +40,5 @@ add multiple css styles, separate them by a semicolon. ### Links -* https://getbootstrap.com/docs/4.1/components/collapse/#accordion-example -* https://www.w3schools.com/bootstrap4/bootstrap_collapse.asp +* https://getbootstrap.com/docs/5.3/components/accordion/ diff --git a/docs/components/alert.md b/docs/components/alert.md index 0a0907a..55df8c2 100644 --- a/docs/components/alert.md +++ b/docs/components/alert.md @@ -54,6 +54,5 @@ add multiple css styles, separate them by a semicolon. ### Links -* https://getbootstrap.com/docs/4.1/components/alerts/ -* https://www.w3schools.com/bootstrap4/bootstrap_alerts.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/alerts/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ diff --git a/docs/components/badge.md b/docs/components/badge.md index 31eb228..6c054c1 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -52,7 +52,6 @@ add multiple css styles, separate them by a semicolon. ### Links -* https://getbootstrap.com/docs/4.1/components/badge/ -* https://www.w3schools.com/bootstrap4/bootstrap_badges.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/badge/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ * diff --git a/docs/components/button.md b/docs/components/button.md index c228f21..852ab9f 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -78,7 +78,6 @@ background with button color. ### Links -* https://getbootstrap.com/docs/4.1/components/buttons/ -* https://www.w3schools.com/bootstrap4/bootstrap_buttons.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/buttons/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ * diff --git a/docs/components/card.md b/docs/components/card.md index a059ffe..cf473c1 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -109,6 +109,5 @@ add multiple css styles, separate them by a semicolon. ### Links -* https://getbootstrap.com/docs/4.1/components/card/ -* https://www.w3schools.com/bootstrap4/bootstrap_cards.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/card/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ diff --git a/docs/components/carousel.md b/docs/components/carousel.md index 1a8f7fd..44d1858 100644 --- a/docs/components/carousel.md +++ b/docs/components/carousel.md @@ -38,5 +38,4 @@ attributes, otherwise the parser will drop all but one: ``` ### Links -* https://getbootstrap.com/docs/4.1/components/carousel/ -* https://www.w3schools.com/bootstrap4/bootstrap_carousel.asp +* https://getbootstrap.com/docs/5.3/components/carousel/ diff --git a/docs/components/collapse.md b/docs/components/collapse.md index 8b6abd7..1bf65e0 100644 --- a/docs/components/collapse.md +++ b/docs/components/collapse.md @@ -29,5 +29,4 @@ be used as the trigger element. In this case, all but the attributes ### Links -* https://getbootstrap.com/docs/4.1/components/collapse/ -* https://www.w3schools.com/bootstrap4/bootstrap_collapse.asp +* https://getbootstrap.com/docs/5.3/components/collapse/ diff --git a/docs/components/jumbotron.md b/docs/components/jumbotron.md index 86a34bd..8f63dde 100644 --- a/docs/components/jumbotron.md +++ b/docs/components/jumbotron.md @@ -1,9 +1,21 @@ ## Jumbotron + +> **⚠️ Deprecated.** Bootstrap 5 removed the `.jumbotron` component. The +> `bootstrap_jumbotron` parser function is retained for backward compatibility +> and now emits the equivalent Bootstrap 5 utility-class combination +> (`p-5 mb-4 bg-body-tertiary rounded-3`) per the official migration guide +> linked below. New content should prefer composing utility classes directly. +> The parser function may be removed in a future major release. + A jumbotron indicates a big box for calling extra attention to some special content or information. -A jumbotron is displayed as a grey box with rounded corners. It also enlarges -the font sizes of the text inside it. +A jumbotron is displayed as a light box with rounded corners. Note that the +Bootstrap 4 `.jumbotron` class also enlarged contained headings automatically; +the Bootstrap 5 utility-class composition does not. If you want the +BS4-era larger-font look, apply `display-*` / `fs-*` utility classes on +your headings and paragraphs inside the tag. The migration guide and example +linked below show the canonical pattern. See also: * [Alert](alert.md) @@ -33,5 +45,5 @@ add multiple css styles, separate them by a semicolon. ### Links -* https://getbootstrap.com/docs/4.1/components/jumbotron/ -* https://www.w3schools.com/bootstrap4/bootstrap_jumbotron.asp +* https://getbootstrap.com/docs/5.3/migration/#jumbotron +* https://getbootstrap.com/docs/5.3/examples/jumbotron/ diff --git a/docs/components/modal.md b/docs/components/modal.md index 2bfe7a4..8978e87 100644 --- a/docs/components/modal.md +++ b/docs/components/modal.md @@ -76,8 +76,7 @@ be used as the trigger element. ### Links -* https://getbootstrap.com/docs/4.1/components/modal/ -* https://www.w3schools.com/bootstrap4/bootstrap_modal.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/modal/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ Please, see also the [known issues](../known-issues.md) with this component. diff --git a/docs/components/popover.md b/docs/components/popover.md index 5b75e1f..2acb18d 100644 --- a/docs/components/popover.md +++ b/docs/components/popover.md @@ -94,6 +94,5 @@ behaviour with: ### Links -* https://getbootstrap.com/docs/4.1/components/popovers/ -* https://www.w3schools.com/bootstrap4/bootstrap_popover.asp -* https://getbootstrap.com/docs/4.1/utilities/colors/ +* https://getbootstrap.com/docs/5.3/components/popovers/ +* https://getbootstrap.com/docs/5.3/utilities/colors/ diff --git a/docs/components/tooltip.md b/docs/components/tooltip.md index 726af56..fcf2af7 100644 --- a/docs/components/tooltip.md +++ b/docs/components/tooltip.md @@ -51,5 +51,4 @@ following to your `Mediawiki:Common.css`: ``` ### Links -* https://getbootstrap.com/docs/4.1/components/tooltips/ -* https://www.w3schools.com/bootstrap4/bootstrap_tooltip.asp +* https://getbootstrap.com/docs/5.3/components/tooltips/ diff --git a/docs/known-issues.md b/docs/known-issues.md index 23b8ea5..0c7d55b 100644 --- a/docs/known-issues.md +++ b/docs/known-issues.md @@ -6,36 +6,26 @@ elements. When you put popovers on a page with modals (or image modals), the modals break. -### Modals and vector -Modals are not fully compatible with the vector skin. Therefore they are -missing the backdrop. Also, you might notice a slight "wobble" in -vector's header every time the modal pops up. - ### Modals and definition lists Some user experience broken html output when trying to use modals as the term in definition lists. Using the html equivalent causes the same problem. -### Modal backdrops -Sometimes, not only in vector skin, modal backdrops (the greying out of -the background) tend to stack the wrong way. In these instances the -z-index of the modal and the backdrop are ignored and the backdrop -overlays the modal and everything else. You cannot even close the modal -and have to reload the page. - -When this happens with your installation you have to disable backdrops -altogether. Please add the following to your `MediaWiki:Common.css` or -anywhere else where css is processed: -```css -.modal-backdrop { - display: none; -} -``` +### Modal backdrops on Vector and Vector 2022 +On these two skins the page-container creates a stacking context that +traps the modal beneath its own backdrop. BC ships a CSS workaround +(`modules/ext.bootstrapComponents.modal.vector-fix.css`) that suppresses +the backdrop on those skins, applied automatically; no configuration is +required. Chameleon, Medik, MonoBook, and Timeless don't establish a +trapping ancestor, so the standard Bootstrap stack works correctly on +those skins without the workaround. The root-cause fix (modal teleport +/ portal out of the trapping container) is tracked at +[issue #91](https://github.com/oetterer/BootstrapComponents/issues/91). ### Navbar overlaps modal -Oftentimes when you have problems with the backdrop, your z-index calculation -is off. Then it can also happen, that your Navbar overlaps the modal. In that case -simply "push" the modal further down. For example: +If your skin has a sticky or fixed navbar, the modal heading can slip +behind it. Push the modal down by a navbar-height in your skin or wiki +CSS, for example: ```css .modal { top: 60px; diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 8a84850..11c6049 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -1,7 +1,83 @@ ## Migration Guide +### Migrating from Bootstrap 4 (BootstrapComponents 5.x) to Bootstrap 5 (BootstrapComponents 6.0) + +BootstrapComponents 6.0 upgrades the underlying Bootstrap framework from version 4 to version 5.3. This guide helps you understand the changes and migrate your wiki. + +#### System Requirements +The MediaWiki (1.43 or later) and PHP (8.1 or later) floors are unchanged from BC 5.x; the only new requirement in 6.0 is the underlying Bootstrap extension version. +- **Bootstrap extension:** `mediawiki/bootstrap` ^6.0 (provides Bootstrap 5.3); BC 5.x used `^5.0` (Bootstrap 4). + +#### User Impact +Most existing wiki markup using BootstrapComponents continues to work without changes; the extension handles most Bootstrap 5 migrations internally. The notable exceptions are noted below. + +#### Component Changes + +##### Jumbotron +The Jumbotron component still works but now uses Bootstrap 5 utility classes instead of the removed `.jumbotron` class. The visual appearance should be similar but may have minor differences. Consider: +- Using utility classes directly: `
` +- Or continue using `` tag which is now implemented using these utilities +- Reference: https://getbootstrap.com/docs/5.3/examples/jumbotron/ + +##### `color="default"` +Bootstrap 5 has no `default` colour family (it was dropped in BS4 already). BC accepts `color="default"` for back-compat but the resulting `*-default` classes are effectively unstyled at the framework level. If you want the BS3-era neutral look, pick a real BS5 colour explicitly: `color="secondary"` (mid-grey filled, matches the BS4 upstream recommendation) or `color="light"` (light filled, closer to BS3's actual visual character). + +##### Badge Pill +If you're using custom CSS targeting `.badge-pill`, update to `.rounded-pill`: +```css +/* Old */ +.badge-pill { ... } + +/* New */ +.rounded-pill { ... } +``` + +##### Alert and Modal Close Buttons +Close buttons now use Bootstrap 5's `.btn-close` class. If you have custom CSS targeting `.close`: +```css +/* Old */ +.close { ... } + +/* New */ +.btn-close { ... } +``` + +#### JavaScript Changes +Bootstrap 5 removed jQuery dependency. If you have custom JavaScript interacting with Bootstrap components: + +**Old (Bootstrap 4 + jQuery):** +```javascript +$('.carousel').carousel(); +$('[data-toggle="tooltip"]').tooltip(); +``` + +**New (Bootstrap 5 vanilla JS):** +```javascript +document.querySelectorAll('.carousel').forEach(el => { + new bootstrap.Carousel(el); +}); +document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(el => { + new bootstrap.Tooltip(el); +}); +``` + +#### Data Attributes +If you're using custom HTML with Bootstrap data attributes, update to the `data-bs-*` prefix: +- `data-toggle` → `data-bs-toggle` +- `data-target` → `data-bs-target` +- `data-dismiss` → `data-bs-dismiss` +- `data-slide` → `data-bs-slide` +- `data-parent` → `data-bs-parent` +- `data-content` → `data-bs-content` +- `data-placement` → `data-bs-placement` +- `data-trigger` → `data-bs-trigger` + +--- + +### Migrating from Bootstrap 3 (BootstrapComponents 1.x) to Bootstrap 4 (BootstrapComponents 4.x-5.x) + There have been some changes between versions ~1.0 and ~4.0. Foremost is that -the new BootstrapComponents utilizes Twitter Bootstrap4. Therefore, it mirrors +the new BootstrapComponents utilizes Twitter Bootstrap 4. Therefore, it mirrors changes made by Bootstrap. Also, extension loading must now be done manually in your LocalSettings, no diff --git a/docs/release-notes.md b/docs/release-notes.md index c25a1c6..8aea1b2 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,8 +5,18 @@ Released on TBD Breaking changes: -* requires MediaWiki 1.43 or later -* requires PHP 8.1 or later +* requires `mediawiki/bootstrap` ^6.0 (Bootstrap 5) + +Changes: +* migrate to Bootstrap 5.3 +* component init no longer requires jQuery +* badge classes updated: `badge-pill` becomes `rounded-pill`, `badge-` becomes `text-bg-` +* alert and modal close buttons use the Bootstrap 5 `btn-close` shape +* jumbotron now composes utility classes; Bootstrap 5 removed `.jumbotron` +* carousel indicators use `' . PHP_EOL + . "\t". '' . PHP_EOL + . "\t". '' . PHP_EOL + . '
' . PHP_EOL . '', + . '', 'isHTML' => true, 'noparse' => true, ], @@ -104,15 +104,15 @@ public function galleryDataProvider() { ], [], [ - 0 => '', 'isHTML' => true, 'noparse' => true, ], diff --git a/tests/phpunit/Unit/Components/AlertTest.php b/tests/phpunit/Unit/Components/AlertTest.php index 1046fa2..98cc997 100644 --- a/tests/phpunit/Unit/Components/AlertTest.php +++ b/tests/phpunit/Unit/Components/AlertTest.php @@ -83,17 +83,17 @@ public function placeMeArgumentsProvider() { 'dismiss_arbitrary' => [ $this->input, [ 'dismissible' => 'bla' ], - '', + '', ], 'dismiss' => [ $this->input, [ 'dismissible' => true ], - '', + '', ], 'fading' => [ $this->input, [ 'dismissible' => 'fade', 'color' => 'warning' ], - '', + '', ], 'manual id, no dismiss' => [ $this->input, diff --git a/tests/phpunit/Unit/Components/BadgeTest.php b/tests/phpunit/Unit/Components/BadgeTest.php index 3c772b0..6b27199 100644 --- a/tests/phpunit/Unit/Components/BadgeTest.php +++ b/tests/phpunit/Unit/Components/BadgeTest.php @@ -69,7 +69,7 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [], - '' . $this->input . '', + '' . $this->input . '', ], 'empty' => [ '', @@ -79,22 +79,22 @@ public function placeMeArgumentsProvider() { 'manual id' => [ $this->input, [ 'id' => 'book' ], - '' . $this->input . '', + '' . $this->input . '', ], 'style and class' => [ $this->input, [ 'class' => 'dummy nice', 'style' => 'float:right;background-color:#80266e' ], - '' . $this->input . '', + '' . $this->input . '', ], 'pill' => [ $this->input, [ 'pill' => 'true' ], - '' . $this->input . '', + '' . $this->input . '', ], 'no pill' => [ $this->input, [ 'pill' => 0 ], - '' . $this->input . '', + '' . $this->input . '', ], ]; } diff --git a/tests/phpunit/Unit/Components/ButtonTest.php b/tests/phpunit/Unit/Components/ButtonTest.php index d7897da..7ffc080 100644 --- a/tests/phpunit/Unit/Components/ButtonTest.php +++ b/tests/phpunit/Unit/Components/ButtonTest.php @@ -80,7 +80,7 @@ public function testCanInjectRawAttributes() { ); $instance->injectRawAttributes( - [ 'data-toggle' => 'foo', 'data-target' => '#bar' ] + [ 'data-bs-toggle' => 'foo', 'data-bs-target' => '#bar' ] ); $generatedOutput = $instance->parseComponent( $parserRequest ); @@ -91,7 +91,7 @@ public function testCanInjectRawAttributes() { $this->assertMatchesRegularExpression( '~^' . $this->input . '$~', + . '" data-bs-toggle="foo" data-bs-target="#bar">' . $this->input . '$~', $generatedOutput ); } diff --git a/tests/phpunit/Unit/Components/CardTest.php b/tests/phpunit/Unit/Components/CardTest.php index 5792c45..ff785d6 100644 --- a/tests/phpunit/Unit/Components/CardTest.php +++ b/tests/phpunit/Unit/Components/CardTest.php @@ -148,7 +148,7 @@ public function placeMeArgumentsProvider() { 'footer-style'=> 'padding:5px', ], '
' - . '
' + . '
' . '

HEADING TEXT

[[File:Serenity.png]]' . '
' . $this->input . '
[[File:Serenity.png|class=card-img-bottom]]
', @@ -179,12 +179,12 @@ public function placeMeInsideAccordionArgumentsProvider() { 'simple' => [ $this->input, [], - '
' . $this->input . '
', + '
' . $this->input . '
', ], 'text missing' => [ '', [ 'header' => 'watch this', 'footer' => 'watch what?', 'collapsible' => 'false', ], - '
', + '
', ], 'all attributes' => [ $this->input, @@ -198,12 +198,12 @@ public function placeMeInsideAccordionArgumentsProvider() { 'heading' => 'HEADING TEXT', 'footer' => 'FOOTER TEXT', ], - '

HEADING TEXT

' . $this->input . '
', + '

HEADING TEXT

' . $this->input . '
', ], 'collapsible false' => [ $this->input, [ 'collapsible' => 'false', ], - '
' . $this->input . '
', + '
' . $this->input . '
', ], ]; } diff --git a/tests/phpunit/Unit/Components/CarouselTest.php b/tests/phpunit/Unit/Components/CarouselTest.php index ea34e21..6433abe 100644 --- a/tests/phpunit/Unit/Components/CarouselTest.php +++ b/tests/phpunit/Unit/Components/CarouselTest.php @@ -79,17 +79,17 @@ public function placeMeArgumentsProvider() { 'simple' => [ '[[File:Mal.jpg|Malcolm Reynolds_0]]', [ '[[File:Mal.jpg|Malcolm Reynolds]]' => true, '[[File:Wash.jpg|link' => '|Hoban Washburne]]' ], - '
', ], 'images missing' => [ $this->input, @@ -105,15 +105,15 @@ public function placeMeArgumentsProvider() { 'fade' => true, 'style' => 'float:none;background-color:black', ], - '', ], ]; } diff --git a/tests/phpunit/Unit/Components/CollapseTest.php b/tests/phpunit/Unit/Components/CollapseTest.php index 79dc909..4f9fad0 100644 --- a/tests/phpunit/Unit/Components/CollapseTest.php +++ b/tests/phpunit/Unit/Components/CollapseTest.php @@ -69,27 +69,27 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [], - '#bsc_collapse_NULL
' . $this->input . '
', + '#bsc_collapse_NULL
' . $this->input . '
', ], 'color_unknown' => [ $this->input, [ 'color' => 'unknown' ], - '#bsc_collapse_NULL
' . $this->input . '
', + '#bsc_collapse_NULL
' . $this->input . '
', ], 'button text' => [ $this->input, [ 'text' => 'BUTTON' ], - 'BUTTON
' . $this->input . '
', + 'BUTTON
' . $this->input . '
', ], 'manual id' => [ $this->input, [ 'color' => 'success', 'id' => 'alliance' ], - '#alliance
' . $this->input . '
', + '#alliance
' . $this->input . '
', ], 'style and class' => [ $this->input, [ 'class' => 'dummy nice', 'style' => 'float:right;background-color:green' ], - '#bsc_collapse_NULL
' . $this->input . '
', + '#bsc_collapse_NULL
' . $this->input . '
', ], ]; } diff --git a/tests/phpunit/Unit/Components/JumbotronTest.php b/tests/phpunit/Unit/Components/JumbotronTest.php index 9d73690..86ad7d5 100644 --- a/tests/phpunit/Unit/Components/JumbotronTest.php +++ b/tests/phpunit/Unit/Components/JumbotronTest.php @@ -69,17 +69,17 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [], - '
' . $this->input . '
', + '
' . $this->input . '
', ], 'manual id' => [ $this->input, [ 'id' => 'hms_dortmunder' ], - '
' . $this->input . '
', + '
' . $this->input . '
', ], 'style and class' => [ $this->input, [ 'class' => 'dummy nice', 'style' => 'float:right;background-color:green' ], - '
' . $this->input . '
', + '
' . $this->input . '
', ], ]; } diff --git a/tests/phpunit/Unit/Components/ModalTest.php b/tests/phpunit/Unit/Components/ModalTest.php index 3bb715a..2a6d5f8 100644 --- a/tests/phpunit/Unit/Components/ModalTest.php +++ b/tests/phpunit/Unit/Components/ModalTest.php @@ -79,9 +79,9 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [ 'text' => 'BUTTON' ], - '', - '' . "\n", + '', + '' . "\n", ], 'text missing' => [ $this->input, @@ -95,9 +95,9 @@ public function placeMeArgumentsProvider() { 'text' => 'beforeSerenityafter', 'size' => 'none', ], - 'beforeSerenityafter', - '' . "\n", + 'beforeSerenityafter', + '' . "\n", ], 'all attributes' => [ $this->input, @@ -106,9 +106,9 @@ public function placeMeArgumentsProvider() { 'id' => 'firefly0', 'size' => 'lg', 'class' => 'shiny', 'style' => 'float:right;background-color:black', 'heading' => 'You can\'t take the sky from me!', ], - 'Serenity', - '' . "\n", + 'Serenity', + '' . "\n", ], ]; } diff --git a/tests/phpunit/Unit/Components/PopoverTest.php b/tests/phpunit/Unit/Components/PopoverTest.php index 4bc20e9..b99a9d6 100644 --- a/tests/phpunit/Unit/Components/PopoverTest.php +++ b/tests/phpunit/Unit/Components/PopoverTest.php @@ -69,7 +69,7 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [ 'heading' => 'heading', 'text' => 'BUTTON' ], - '', + '', ], 'heading empty' => [ $this->input, @@ -87,7 +87,7 @@ public function placeMeArgumentsProvider() { 'heading' => 'heading', 'text' => 'BUTTON', 'class' => 'dummy nice', 'style' => 'float:right;background-color:green', 'placement' => 'right', 'trigger' => 'hover', 'id' => 'cudgel', 'size' => 'sm' ], - '', + '', ], ]; } diff --git a/tests/phpunit/Unit/Components/TooltipTest.php b/tests/phpunit/Unit/Components/TooltipTest.php index 810b0a3..8cfcc85 100644 --- a/tests/phpunit/Unit/Components/TooltipTest.php +++ b/tests/phpunit/Unit/Components/TooltipTest.php @@ -74,7 +74,7 @@ public function placeMeArgumentsProvider() { 'simple' => [ $this->input, [ 'text' => 'simple' ], - '' . $this->input . '', + '' . $this->input . '', ], 'empty' => [ '', @@ -89,7 +89,7 @@ public function placeMeArgumentsProvider() { 'id, style and class' => [ $this->input, [ 'text' => 'simple', 'class' => 'dummy nice', 'style' => 'float:right;background-color:#80266e', 'id' => 'vera' ], - '' . $this->input . '', + '' . $this->input . '', ], ]; } diff --git a/tests/phpunit/Unit/ImageModalTest.php b/tests/phpunit/Unit/ImageModalTest.php index 4baf897..8fcd47c 100644 --- a/tests/phpunit/Unit/ImageModalTest.php +++ b/tests/phpunit/Unit/ImageModalTest.php @@ -295,9 +295,9 @@ public function canParseDataProvider(): array 'no params' => [ [], [], - '~~', - '' . "\n", + '~~', + '' . "\n", ], 'frame params w/o thumbnail' => [ [ @@ -309,9 +309,9 @@ public function canParseDataProvider(): array 'valign' => 'text-top', ], [], - '~
test_alt
~', - '' . "\n", + '~
test_alt
~', + '' . "\n", ], 'manual width, frameless' => [ [ @@ -322,9 +322,9 @@ public function canParseDataProvider(): array 'width' => 200, 'page' => 7, ], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], 'thumbnail, manual width' => [ [ @@ -335,9 +335,9 @@ public function canParseDataProvider(): array 'width' => 200, 'page' => 7, ], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], 'manual thumbnail, NOT centered' => [ [ @@ -346,9 +346,9 @@ public function canParseDataProvider(): array 'framed' => false, ], [], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], 'framed' => [ [ @@ -356,9 +356,9 @@ public function canParseDataProvider(): array 'framed' => false, ], [], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], 'centered' => [ [ @@ -367,9 +367,9 @@ public function canParseDataProvider(): array [ 'width' => 200, ], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], 'manual thumbnail, upright' => [ [ @@ -378,9 +378,9 @@ public function canParseDataProvider(): array 'manualthumb' => 'Shuttle.png', ], [], - '~
~', - '' . "\n", + '~
~', + '' . "\n", ], ]; } diff --git a/tests/phpunit/Unit/ImageModalTriggerTest.php b/tests/phpunit/Unit/ImageModalTriggerTest.php index 1ac28bb..19121c8 100644 --- a/tests/phpunit/Unit/ImageModalTriggerTest.php +++ b/tests/phpunit/Unit/ImageModalTriggerTest.php @@ -164,7 +164,7 @@ public function canParseProvider() { 'page' => false, ], [ - '~~', + '~~', ] ], 'frame params w/o thumbnail' => [ @@ -184,7 +184,7 @@ public function canParseProvider() { 'page' => false, ], [ - '~
~', + '~
~', '~test_alt~', ] ], @@ -206,7 +206,7 @@ public function canParseProvider() { 'page' => 7, ], [ - '~
~', + '~
~', '~~', ] ], @@ -228,7 +228,7 @@ public function canParseProvider() { 'page' => 7, ], [ - '~
~', + '~
~', '~
~', '~
~', ] @@ -252,7 +252,7 @@ public function canParseProvider() { 'page' => false, ], [ - '~
~', + '~
~', '~
~', '~~', ] @@ -274,7 +274,7 @@ public function canParseProvider() { 'page' => false, ], [ - '~