outputhtml : display the result, not return it ! (and adapt the unit tests accordinally)

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2372 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-10-23 08:51:38 +00:00
parent 34322f8540
commit 9523dbdc6a
2 changed files with 7 additions and 7 deletions

View File

@@ -11,21 +11,21 @@ class test_outputhtml extends PHPUnit_Framework_TestCase
{
$output = new outputhtml ();
$res = $output->out ("");
$this->assertNotContains ("{content}", $res);
$this->expectOutputRegex ("#<body>\s+</body>#", $res);
}
public function testlayout2 ()
{
$output = new outputhtml ();
$res = $output->out ("data");
$this->assertContains("data", $res);
$this->expectOutputRegex("#data#");
}
public function testlayout3 ()
{
$output = new outputhtml ();
$res = $output->out ("data", "title");
$this->assertContains("data", $res);
$this->expectOutputRegex("#data#");
}
public function testlayout4 ()
@@ -37,7 +37,7 @@ class test_outputhtml extends PHPUnit_Framework_TestCase
</body>
</html>\n");
$output = new outputhtml ();
print ($output->out ("data", "title", FALSE, FALSE, "Tests/layout.html" ));
$output->out ("data", "title", FALSE, FALSE, "Tests/layout.html" );
}
public function testlayout5 ()
@@ -50,7 +50,7 @@ class test_outputhtml extends PHPUnit_Framework_TestCase
</html>\n");
$output = new outputhtml ();
$variable = array ("var"=>"VARIABLE");
print ($output->out ("data", "title", FALSE, FALSE, "Tests/layout.html",
null, $variable));
$output->out ("data", "title", FALSE, FALSE, "Tests/layout.html",
null, $variable);
}
}