我想在 netbeans 为专辑控制器生成 phpunit 测试。它不工作。
错误信息:
PHPUnit Skeleton Generator 1.2.1 by Sebastian Bergmann. PHP Fatal error: Class 'Zend\Mvc\Controller\AbstractActionController' not found in /home/argonist/mfk/skeletion-application/module/Album/src/Album/Controller/AlbumController.php on line 17
PHP Stack trace:
PHP 1. {main}() /opt/lampp/bin/phpunit-skelgen:0
Fatal error: Class 'Zend\Mvc\Controller\AbstractActionController' not found in /home/argonist/mfk/skeletion-application/module/Album/src/Album/Controller/AlbumController.php on line 17
PHP 2. SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main() /opt/lampp/bin/phpunit-skelgen:45
PHP 3. ReflectionClass->newInstanceArgs() /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php:171
Call Stack:
PHP 4. SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator->__construct() /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php:171
0.0002 226352 1. {main}() /opt/lampp/bin/phpunit-skelgen:0 PHP 5. include_once() /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/TestGenerator.php:125
0.0083 373264 2. SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main() /opt/lampp/bin/phpunit-skelgen:45
0.0183 830184 3. ReflectionClass->newInstanceArgs() /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php:171
0.0183 830336 4. SebastianBergmann\PHPUnit\SkeletonGenerator\TestGenerator->__construct() /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php:171
0.0190 892760 5. include_once('/home/argonist/mfk/skeletion-application/module/Album/src/Album/Controller/AlbumController.php') /opt/lampp/lib/php/SebastianBergmann/PHPUnit/SkeletonGenerator/TestGenerator.php:125
更新:
引导程序.php