-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/website/svgr/webpack…
…-6.5.1
- Loading branch information
Showing
6 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
tests/TestSuite/TwbsHelper/View/HtmlStyleAttributeSetTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters