Я не могу просмотреть ответ на вызов диспетчеризации во время теста phpunit в Zend Framework версии 3.
Вот мой код:
public function testGetmodulesAction(){
$this->dispatch('/application/srv/get-modules', 'GET');
$this->assertResponseStatusCode(200);
$this->assertModuleName('application');
$this->assertControllerName(ServiceController::class); // as specified in router's controller name alias
$this->assertControllerClass('ServiceController');
$this->assertMatchedRouteName('application.service');
$res = $this->getResponse();
var_dump($res);die();
}
Даже когда я добавляю --debug
в phpunit
я все еще не могу просмотреть содержимое
Вот мой phpunit.xml
файл:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
bootstrap="bootstrap.php"
backupGlobals="true" backupStaticAttributes="false" cacheTokens="false"
colors="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertWarningsToExceptions="true"
forceCoversAnnotation="true" printerClass="Catalina\Phpunit\ResultPrinter"
processIsolation="true" stopOnError="false" stopOnFailure="false"
stopOnIncomplete="false" stopOnSkipped="false" stopOnRisky="false"
timeoutForSmallTests="1" timeoutForMediumTests="10"
timeoutForLargeTests="60" beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true" verbose="true">
<testsuites>
<testsuite name="Catalina">
<directory suffix="Test.php" phpVersion="7.0.0"
phpVersionOperator=">=">libraries/catalina/test</directory>
<directory suffix="Test.php" phpVersion="7.0.0"
phpVersionOperator=">=">app/modules/Application/test</directory>
</testsuite>
</testsuites>
</phpunit>