Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Test uppercase type with class/ID in selector #769

Merged
merged 1 commit into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
([#690](https://github.com/MyIntervals/emogrifier/pull/690))

### Fixed
- Uppercase type combined with class or ID in selector
([#590](https://github.com/MyIntervals/emogrifier/issues/590),
[#769](https://github.com/MyIntervals/emogrifier/pull/769))
- Dynamic pseudo-class combined with static one (rules copied to `<style>`
element, [#746](https://github.com/MyIntervals/emogrifier/pull/746))
- Descendant attribute selectors (such as `html input[disabled]`)
Expand All @@ -118,7 +121,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
[#550](https://github.com/MyIntervals/emogrifier/issues/550),
[#540](https://github.com/MyIntervals/emogrifier/pull/540),
[#704](https://github.com/MyIntervals/emogrifier/pull/702))
- Don't create empty `style` attributes for unparsable declarations
- Dont create empty `style` attributes for unparsable declarations
([#259](https://github.com/MyIntervals/emogrifier/issues/259),
[#702](https://github.com/MyIntervals/emogrifier/pull/702))
- Allow `:not(:behavioural-pseudo-class)` in selectors
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/CssInlinerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ public function matchedCssDataProvider()
'<p class="p-5 additional-class" style="%1$s">',
],
'type & class => type with class' => ['p.p-2 { %1$s }', '<p class="p-2" style="%1$s">'],
'type (case-insensitive) & class => type with class' => ['P.p-2 { %1$s }', '<p class="p-2" style="%1$s">'],
'ID => with ID' => ['#p4 { %1$s }', '<p class="p-4" id="p4" style="%1$s">'],
'type & ID => type with ID' => ['p#p4 { %1$s }', '<p class="p-4" id="p4" style="%1$s">'],
'type (case-insensitive) & ID => type with ID' => ['P#p4 { %1$s }', '<p class="p-4" id="p4" style="%1$s">'],
'universal => HTML' => ['* { %1$s }', '<html style="%1$s">'],
'universal => element with parent and children' => ['* { %1$s }', '<p class="p-1" style="%1$s">'],
'universal => leaf element' => ['* { %1$s }', '<span style="%1$s">'],
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/EmogrifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,10 @@ public function matchedCssDataProvider()
'<p class="p-5 additional-class" style="%1$s">',
],
'type & class => type with class' => ['p.p-2 { %1$s }', '<p class="p-2" style="%1$s">'],
// broken: type (case-insensitive) & class => type with class
'ID => with ID' => ['#p4 { %1$s }', '<p class="p-4" id="p4" style="%1$s">'],
'type & ID => type with ID' => ['p#p4 { %1$s }', '<p class="p-4" id="p4" style="%1$s">'],
// broken: type (case-insensitive) & ID => type with ID
'universal => HTML' => ['* { %1$s }', '<html style="%1$s">'],
'universal => element with parent and children' => ['* { %1$s }', '<p class="p-1" style="%1$s">'],
'universal => leaf element' => ['* { %1$s }', '<span style="%1$s">'],
Expand Down