Phalcon\Test\FunctionalTestCase::assertController PHP Method

assertController() public method

Assert that the last dispatched controller matches the given controller class name
public assertController ( string $expected )
$expected string The expected controller name
    public function assertController($expected)
    {
        $actual = $this->di->getShared('dispatcher')->getControllerName();
        if ($actual != $expected) {
            throw new \PHPUnit_Framework_ExpectationFailedException(sprintf('Failed asserting Controller name "%s", actual Controller name is "%s"', $expected, $actual));
        }
        $this->assertEquals($expected, $actual);
    }