有没有办法初始化 PHPUnit Test class 模板?
Is there a way to initialize a PHPUnit Test class template?
假设我在名为 Foo.php 的文件中有一个名为 Foo 的 class 我想对其进行单元测试,是否有像 'phpunit init Foo.php' 这样的命令将创建一个名为FooTest.php Foo.php class 文件中每个函数的测试函数都是空的 ?
PHPUnit 中没有测试生成器功能。
以前有,3.7.0版本去掉了
Removed deprecated --skeleton-class
and --skeleton-test
switches. The functionality is now provided by the phpunit-skelgen
command of the PHPUnit_SkeletonGenerator
package. — 3.7.0 Changelog
假设我在名为 Foo.php 的文件中有一个名为 Foo 的 class 我想对其进行单元测试,是否有像 'phpunit init Foo.php' 这样的命令将创建一个名为FooTest.php Foo.php class 文件中每个函数的测试函数都是空的 ?
PHPUnit 中没有测试生成器功能。
以前有,3.7.0版本去掉了
Removed deprecated
--skeleton-class
and--skeleton-test
switches. The functionality is now provided by thephpunit-skelgen
command of thePHPUnit_SkeletonGenerator
package. — 3.7.0 Changelog