Skip to content

Commit

Permalink
tests: Routers tests rewritten to Nette\Test
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 9, 2012
1 parent 97c6a00 commit aed772f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
48 changes: 24 additions & 24 deletions Tester/initialize.php
Expand Up @@ -30,6 +30,30 @@ function dump($var)



/**
* Writes new section.
* @param string
* @return void
*/
function section($heading = NULL)
{
echo $heading ? "==> $heading\n\n" : "===\n\n";
}



/**
* Writes new message.
* @param string
* @return void
*/
function message($message)
{
echo "$message\n\n";
}



/**
* Test helpers.
*
Expand Down Expand Up @@ -91,30 +115,6 @@ public static function purge($dir)



/**
* Writes new section.
* @param string
* @return void
*/
public static function section($heading = NULL)
{
echo $heading ? "==> $heading\n\n" : "===\n\n";
}



/**
* Writes new message.
* @param string
* @return void
*/
public static function message($message)
{
echo "$message\n\n";
}



/**
* Returns current test section.
* @param string
Expand Down
12 changes: 10 additions & 2 deletions tests/Test.dump().001.phpt
Expand Up @@ -44,9 +44,13 @@ class TestClass

dump( new TestClass );

Test::section('Section');
section('Section');

Test::section();
section();

message('message');

echo 'EOF';


__halt_compiler();
Expand Down Expand Up @@ -94,3 +98,7 @@ object(TestClass) (3) {
==> Section

===

message

EOF

0 comments on commit aed772f

Please sign in to comment.