-
-
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 pull request #444 from neilime/dependabot/composer/phpunit/phpu…
…nit-tw-9.5.26 chore(deps-dev): update phpunit/phpunit requirement from ^9.5.25 to ^9.5.26
- Loading branch information
Showing
5 changed files
with
58 additions
and
7 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() | ||
); | ||
} | ||
} |