diff --git a/tests/CSSInlinerTest.php b/tests/CSSInlinerTest.php new file mode 100644 index 0000000..0554a5e --- /dev/null +++ b/tests/CSSInlinerTest.php @@ -0,0 +1,33 @@ +addCSS(__DIR__ . '/test.css'); + $output = $inliner->render(file_get_contents('test.html'), true); + $expected = << +

Hello, world!

+Google +Facebook +Outlook + +EXPECTED; + $this->assertSame($expected, $output); + } + +} diff --git a/tests/test.css b/tests/test.css new file mode 100644 index 0000000..d4cc693 --- /dev/null +++ b/tests/test.css @@ -0,0 +1,5 @@ +h1{color:#27ae60;font-size:200px;margin:10px 50px 80px 30px;} +a{color:#2c3e50;} +a#outlook{color:#2980b9;position:absolute;top:30px;left:500px;padding:50px;} +a.facebook{color:#8e44ad;margin:300px;} +a.google{color:#c0392b;font-weight:700;font-family:Verdana, 'Open Sans';font-size:30px;} diff --git a/tests/test.html b/tests/test.html new file mode 100644 index 0000000..77a1120 --- /dev/null +++ b/tests/test.html @@ -0,0 +1,4 @@ +

Hello, world!

+Google +Facebook +Outlook