|
From: Piotr S. <pio...@gm...> - 2010-12-18 22:34:36
|
Hello
I write Framework and now I am writing test for my dispatcher. And
there's following problem:
class TestDispatcher extends UnitTestCase
{
public function setUp()
{
require_once "../core/fDispatcher.php";
Mock::generate( "fDispatcher" );
}
public function testDispatch()
{
$dispatcher = new MockfDispatcher;
$dispatcher->expectOnce( "runController" );
$dispatcher->dispatch();
}
}
Original method dispatch() calls runController(). It doesn't work.
Even it doesn't count it as an assertion so test case is completed. It
works only when I replace
$dispatcher->dispatch() to $dispatcher->runController().
Help, please.
--
Piotr Skowronek
|