Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/website/svgr/webpack…
Browse files Browse the repository at this point in the history
…-6.5.1
  • Loading branch information
neilime authored Nov 8, 2022
2 parents afeeedb + fbe9cd1 commit 6132a14
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
id: setup-node
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
node-version-file: ".nvmrc"
cache: yarn
cache-dependency-path: website/yarn.lock

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
54 changes: 54 additions & 0 deletions tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace TestSuite\TwbsHelper\View;

class HtmlStyleAttributeSetTest extends \PHPUnit\Framework\TestCase
{
/**
* @var \\Laminas\View\Renderer\PhpRenderer
*/
protected $phpRenderer;

protected function setUp(): void
{
$viewHelperPluginManager = \TestSuite\Bootstrap::getServiceManager()->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()
);
}
}
6 changes: 3 additions & 3 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5226,9 +5226,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"
Expand Down

0 comments on commit 6132a14

Please sign in to comment.