From f0de7c2c629190748c12a18cf3607a4996b3436c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Nov 2022 01:00:53 +0000 Subject: [PATCH 1/2] chore(deps-dev): update phpunit/phpunit requirement Updates the requirements on [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) to permit the latest version. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/main/ChangeLog-9.5.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.25...9.5.26) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- .github/workflows/build-website.yml | 5 +- .github/workflows/continuous-integration.yml | 2 +- README.md | 2 +- composer.json | 2 +- .../View/HtmlStyleAttributeSetTest.php | 54 +++++++++++++++++++ 5 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index de0b1e629..bb1855cc7 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -10,13 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: echo ::set-output name=NVMRC::$(cat .nvmrc) - id: nvm - uses: actions/setup-node@v3.5.1 - id: setup-node with: - node-version: "${{ steps.nvm.outputs.NVMRC }}" + node-version-file: ".nvmrc" cache: yarn cache-dependency-path: website/yarn.lock diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b0e0f6681..4555ffe39 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -32,7 +32,7 @@ jobs: - name: ♻️ Get composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: ♻️ Cache composer dependencies uses: actions/cache@v3 diff --git a/README.md b/README.md index 4f27f0f6f..07aad0845 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ ## Demonstration / example -🚀 Render **ALL** of the [Twitter Bootstrap v5+](https://getbootstrap.com/) elements with TwbsHelper : [see it in action, on-line](https://neilime.github.io/twbs-helper-module/#/usage/?id=rendering). +🚀 Render **ALL** of the [Twitter Bootstrap v5+](https://getbootstrap.com/) elements with TwbsHelper : [see it in action, on-line](https://neilime.github.io/twbs-helper-module/docs/usage/intro/). ## Documentation diff --git a/composer.json b/composer.json index 10ace24dc..65527ba00 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^0.12", "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^9.5.25", + "phpunit/phpunit": "^9.5.26", "slam/phpstan-laminas-framework": "^0.12", "spatie/phpunit-snapshot-assertions": "^4.2", "squizlabs/php_codesniffer": "^3.7" diff --git a/tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php b/tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php new file mode 100644 index 000000000..2a1dab1a9 --- /dev/null +++ b/tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php @@ -0,0 +1,54 @@ +get('ViewHelperManager'); + $this->phpRenderer = new \Laminas\View\Renderer\PhpRenderer(); + $this->phpRenderer->setHelperPluginManager($viewHelperPluginManager); + } + + public function testToString() + { + $htmlStyleAttributeSet = new \TwbsHelper\View\HtmlStyleAttributeSet([ + 'width' => '50%', + 'color' => 'red', + ]); + + $this->assertSame( + 'color: red; width: 50%;', + $htmlStyleAttributeSet->__toString() + ); + } + + public function testMerge() + { + $htmlStyleAttributeSet = new \TwbsHelper\View\HtmlStyleAttributeSet([ + 'width' => '50%', + 'color' => 'red', + ]); + + $htmlStyleAttributeSet->merge([ + 'width' => '50%', + 'color' => 'green', + 'height' => '100%', + ]); + + $this->assertSame( + [ + 'color' => 'green', + 'height' => '100%', + 'width' => '50%', + ], + $htmlStyleAttributeSet->getArrayCopy() + ); + } +} From 0cb810c8bb92d873068c3b75ab64f18dba6d745d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 18:34:22 +0000 Subject: [PATCH 2/2] chore(deps): bump loader-utils from 2.0.2 to 2.0.3 in /website Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.3) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index a11ba2126..636d28e83 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -5043,9 +5043,9 @@ loader-runner@^4.2.0: integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== loader-utils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" - integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A== + version "2.0.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.3.tgz#d4b15b8504c63d1fc3f2ade52d41bc8459d6ede1" + integrity sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A== dependencies: big.js "^5.2.2" emojis-list "^3.0.0"