mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
remove redundant test
This commit is contained in:
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Smarty PHPunit tests for PHP resources
|
|
||||||
*
|
|
||||||
* @package PHPunit
|
|
||||||
* @author Uwe Tews
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* class for PHP resource tests
|
|
||||||
*
|
|
||||||
* @runTestsInSeparateProcess
|
|
||||||
* @preserveGlobalState disabled
|
|
||||||
* @backupStaticAttributes enabled
|
|
||||||
*/
|
|
||||||
class OutputFilterTrimWhitespaceTest extends PHPUnit_Smarty
|
|
||||||
{
|
|
||||||
public function setUp()
|
|
||||||
{
|
|
||||||
$this->setUpSmarty(dirname(__FILE__));
|
|
||||||
$this->smarty->loadFilter('output', 'trimwhitespace');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testInit()
|
|
||||||
{
|
|
||||||
$this->cleanDirs();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testWhitespace()
|
|
||||||
{
|
|
||||||
$expected =
|
|
||||||
'<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> <meta charset="utf-8"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>whitespace</title> <meta name="title" content=""/> <meta name="description" content=""/> <link rel="stylesheet" type="text/css" href="screen.css"/> </head> <body> <!--[if lte IE 6]>internet explorer conditional comment<![endif]--> <!--[if lte IE 7]>internet explorer conditional comment<![endif]--> <div class=" asdasd " id=\'not\' data-one=" " style=" " title=\' \'></div> <img src="foo" alt=""/> <script type="text/javascript">
|
|
||||||
foobar
|
|
||||||
</script> <script>
|
|
||||||
foobar
|
|
||||||
</script> <pre id="foobar">
|
|
||||||
foobar
|
|
||||||
</pre> <pre>
|
|
||||||
foobar
|
|
||||||
</pre> <p> <textarea name="foobar">
|
|
||||||
foobar
|
|
||||||
</textarea> </p> </body> </html>';
|
|
||||||
|
|
||||||
|
|
||||||
$this->assertEquals($this->normalizeString($expected), $this->normalizeString($this->smarty->fetch('whitespace.tpl')));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,45 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
||||||
<title>whitespace</title>
|
|
||||||
<meta name="title" content=""/>
|
|
||||||
<meta name="description" content=""/>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="screen.css"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!--[if lte IE 6]>internet explorer conditional comment<![endif]-->
|
|
||||||
<!--[if lte IE 7]>internet explorer conditional comment<![endif]-->
|
|
||||||
<div class=" asdasd " id='not' data-one=" "
|
|
||||||
style=" " title=' '></div>
|
|
||||||
<!-- html comment -->
|
|
||||||
<!--
|
|
||||||
html
|
|
||||||
multiline
|
|
||||||
comment
|
|
||||||
-->
|
|
||||||
<img
|
|
||||||
src="foo" alt=""/>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
foobar
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
foobar
|
|
||||||
</script>
|
|
||||||
<pre id="foobar">
|
|
||||||
foobar
|
|
||||||
</pre>
|
|
||||||
<pre>
|
|
||||||
foobar
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
<textarea name="foobar">
|
|
||||||
foobar
|
|
||||||
</textarea>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user