Skip to content

Commit 9496b9d

Browse files
committed
Tweak tests
1 parent 380beed commit 9496b9d

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

tests/CssInlinerPluginTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function itShouldConvertHtmlBody()
6060

6161
$mailer->send($message);
6262

63-
$this->assertXmlStringEqualsXmlString(
63+
$this->assertEquals(
6464
$this->stubs['converted-html'],
6565
$this->normalize($message->getBody())
6666
);
@@ -106,10 +106,7 @@ public function itShouldConvertHtmlBodyAndTextParts()
106106

107107
$children = $message->getChildren();
108108

109-
$this->assertXmlStringEqualsXmlString(
110-
$this->stubs['converted-html'],
111-
$this->normalize($message->getBody())
112-
);
109+
$this->assertEquals($this->stubs['converted-html'], $this->normalize($message->getBody()));
113110
$this->assertEquals($this->stubs['plain-text'], $children[0]->getBody());
114111
}
115112

@@ -150,10 +147,7 @@ public function itShouldConvertHtmlBodyAsAPart()
150147

151148
$children = $message->getChildren();
152149

153-
$this->assertXmlStringEqualsXmlString(
154-
$this->stubs['converted-html'],
155-
$this->normalize($children[0]->getBody())
156-
);
150+
$this->assertEquals($this->stubs['converted-html'], $this->normalize($children[0]->getBody()));
157151
}
158152

159153
/** @test **/

tests/stubs/converted-html.stub

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@
99
div.block ul li.small {
1010
margin: 10px;
1111
}
12+
.picture-feed {
13+
width: 50%;
14+
}
15+
@media (max-width: 768px) {
16+
.picture-feed {
17+
width: 100%;
18+
}
19+
}
1220
</style>
1321
</head>
1422
<body>
23+
<div><img class="picture-feed" src="foo.jpg" style="width: 50%;"></div>
1524
<div class="block" style="width: 100px; height: 20px;">
1625
text
1726

tests/stubs/original-html.stub

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@
99
div.block ul li.small {
1010
margin: 10px;
1111
}
12+
.picture-feed {
13+
width: 50%;
14+
}
15+
@media (max-width: 768px) {
16+
.picture-feed {
17+
width: 100%;
18+
}
19+
}
1220
</style>
1321
</head>
1422
<body>
23+
<div><img class="picture-feed" src="foo.jpg"></div>
1524
<div class="block">
1625
text
1726

0 commit comments

Comments
 (0)