-
-
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.
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](sebastianbergmann/phpunit@9.5.25...9.5.26) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
- Loading branch information
1 parent
bc01ed9
commit f0de7c2
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() | ||
); | ||
} | ||
} |