0
我用Auth模块编写了一个ZF2应用程序。此Auth模块的设置在其Module.php文件中完成。如何防止在Zend Framework中加载模块2 phpunit test
我在Zend Framework 2单元测试教程(http://framework.zend.com/manual/2.2/en/tutorials/unittesting.html)中设置了一个测试,但要使用Application模块进行测试。在测试的bootstrap.php中我只包括在配置应用模块:
$config = array(
'module_listener_options' => array(
'module_paths' => $zf2ModulePaths,
),
'modules' => array(
'Application',
)
);
而在phpunit.xml我只包括这个测试目录:
<phpunit bootstrap="Bootstrap.php">
<testsuites>
<testsuite name="myApplication">
<directory>./ApplicationTest</directory>
</testsuite>
</testsuites>
</phpunit>
我希望不要有验证模块正在加载,所以它应该被禁用的测试。但是我得到一个由Auth模块中的函数抛出的异常,所以我认为它是无论如何加载的。
难道我误解了引导,并且有没有办法阻止该模块被加载?