Skip to content

Commit 08a1b96

Browse files
committed
added test to html provider
1 parent 997f27d commit 08a1b96

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/HtmlProviderTest.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
class HtmlProviderTest extends TestCaseBase
4+
{
5+
public function testAllowExternalImages()
6+
{
7+
$this->assertEmbed(
8+
'http://www.brothers-brick.com/2016/04/06/stunning-lego-darth-vader-mask-cleverly-hides-scenes-from-star-wars/',
9+
[
10+
'image' => 'http://i0.wp.com/farm2.staticflickr.com/1458/25975786430_c69776287e_z.jpg?resize=625%2C495&ssl=1',
11+
], [
12+
'providers' => [
13+
'html' => [
14+
'externalImages' => true,
15+
],
16+
],
17+
]
18+
);
19+
}
20+
21+
public function testNotAllowExternalImages()
22+
{
23+
$this->assertEmbed(
24+
'http://www.brothers-brick.com/2016/04/06/stunning-lego-darth-vader-mask-cleverly-hides-scenes-from-star-wars/',
25+
[
26+
'image' => '',
27+
], [
28+
'providers' => [
29+
'html' => [
30+
'externalImages' => false,
31+
],
32+
],
33+
]
34+
);
35+
}
36+
}

0 commit comments

Comments
 (0)