Have you tried dispatching like this? I have just tried forwarding inside one of my controller actions and unit tests work fine. This is my code:
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase
class IndexControllerTest extends AbstractHttpControllerTestCase
{
public function setUp()
{
require APPLICATION_PATH . '/init_autoloader.php';
$testConfig = include APPLICATION_PATH . '/config/test.php';
$this->setApplicationConfig($testConfig);
parent::setUp();
}
public function testFoo()
{
$this->dispatch('/catalogue');
$this->assertResponseStatusCode(200);
$this->assertModuleName('Catalogue');
$this->assertControllerName('Catalogue\Controller\Index');
$this->assertControllerClass('IndexController');
$this->assertActionName('index');
$this->assertMatchedRouteName('logcataloguen');
}
}