Skip to content

Commit

Permalink
minor #154 Adding a test for null value case (weaverryan)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the main branch.

Discussion
----------

Adding a test for null value case

Test case for #153

Commits
-------

b03b0ba Adding a test for null value case
  • Loading branch information
weaverryan committed Nov 29, 2021
2 parents 028fc75 + b03b0ba commit b5bc02a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Install Global Dependencies
run: |
composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
composer global require --no-progress --no-scripts --no-plugins symfony/flex @dev
- name: "Composer install"
uses: "ramsey/composer-install@v1"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [v1.13.1](https://github.com/symfony/webpack-encore-bundle/releases/tag/v1.13.1)

*November 28th, 2021*

### Bug Fix

- [#153](https://github.com/symfony/webpack-encore-bundle/pull/153) - Skipping null values from rendering - *@sadikoff*

## [v1.13.0](https://github.com/symfony/webpack-encore-bundle/releases/tag/v1.13.0)

*November 19th, 2021*
Expand Down
2 changes: 1 addition & 1 deletion tests/Asset/EntrypointLookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function testExceptionOnBadFilename()
public function testExceptionOnMissingEntry()
{
$this->expectException(\Symfony\WebpackEncoreBundle\Exception\EntrypointNotFoundException::class);
$this->expectExceptionMessageMatches('/^Could not find the entry "fake_entry" in "[a-zA-Z0-9\/]+". Found: my_entry, other_entry\.$/');
$this->expectExceptionMessageMatches('/^Could not find the entry "fake_entry" in "[a-zA-Z0-9\/_]+". Found: my_entry, other_entry\.$/');

$this->entrypointLookup->getCssFiles('fake_entry');
}
Expand Down
6 changes: 6 additions & 0 deletions tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ public function provideRenderStimulusController()
'controllerValues' => ['isEnabled' => true],
'expected' => 'data-controller="true-controller" data-true-controller-is-enabled-value="true"',
];

yield 'null-attribute-value-does-not-render' => [
'dataOrControllerName' => 'null-controller',
'controllerValues' => ['firstName' => null],
'expected' => 'data-controller="null-controller"',
];
}

/**
Expand Down

0 comments on commit b5bc02a

Please sign in to comment.