Phalcon\Test\FunctionalTestCase::assertAction PHP Method

assertAction() public method

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