Files
DomFramework/Tests/outputhtmlTest.php
2015-08-14 08:21:11 +00:00

57 lines
1.2 KiB
PHP

<?php
/** DomFramework - Tests
@package domframework
@author Dominique Fournier <dominique@fournier38.fr> */
/** Test the outputhtml.php file */
class test_outputhtml extends PHPUnit_Framework_TestCase
{
/** Entry null */
public function testlayout1 ()
{
$output = new outputhtml ();
$res = $output->out ("");
$this->assertNotContains ("{content}", $res);
}
public function testlayout2 ()
{
$output = new outputhtml ();
$res = $output->out ("data");
$this->assertContains("data", $res);
}
public function testlayout3 ()
{
$output = new outputhtml ();
$res = $output->out ("data", "title");
$this->assertContains("data", $res);
}
public function testlayout4 ()
{
$this->expectOutputString("<html>
<body>
Text
</body>
</html>\n");
$output = new outputhtml ();
print ($output->out ("data", "title", FALSE, FALSE, "Tests/layout.html" ));
}
public function testlayout5 ()
{
$this->expectOutputString("<html>
<body>
Text
VARIABLE
</body>
</html>\n");
$output = new outputhtml ();
$variable = array ("var"=>"VARIABLE");
print ($output->out ("data", "title", FALSE, FALSE, "Tests/layout.html",
null, $variable));
}
}