think-testing
think-testing copied to clipboard
ThinkPHP 5 应用单元测试组件
php think unit [think\exception\ErrorException] Cannot declare class Composer\Autoload\ComposerStaticInit9c87eadda89df04182339855203c8c55, because the name is already in use Exception trace: () at /Users/tmp/vendor/composer/autoload_static.php:7 think\Error::appShutdown() at n/a:n/a
` PHP Fatal error: Class 'tests\TestCase' not found in E:\work\www\think-testing-3.0\example\tests\ExampleTest.php on line 13 PHP Stack trace: PHP 1. {main}() D:\bin\phpunit.phar:0 PHP 2. PHPUnit\TextUI\Command::main() D:\bin\phpunit.phar:616 PHP 3. PHPUnit\TextUI\Command->run() phar://D:/bin/phpunit.phar/phpunit/TextUI/Command.php:162 PHP 4....
bugfix:修复\think\testing\CrawlerTrait::call() 没有实例化\Symfony\Component\DomCrawler\Crawler,导致\think\testing\InteractsWithPages::$crawler为空值的bug
update composer
如题,目前用的是tp5.0,这里最低版本是2.0,咋用PHPUnit?
"require": { "topthink/think-installer": "~2.0", "topthink/framework": "5.1.*", "topthink/think-helper": "~1.0", "phpunit/phpunit": "^6.0", "symfony/dom-crawler": "^2.8.8" }, 现在只支持5.1.* dev-master 版本的 think-helper 版本是~1.0 但是tp6默认安装的 think-helper版本是 ^3.1
 不能动态设置此参数,导致无法解析路由,麻烦问一下,这个应该如何解决??
  如图
我在本地配置的PHP环境,做了一个hosts解析www.pz.com指向127.0.0.1, 通过浏览器可以访问:http://www.pz.com/v1/demo/index,然后单元测试下来,老是报500错误: D:\web\puzzlebid>php think unit PHPUnit 5.7.27 by Sebastian Bergmann and contributors. F 1 / 1 (100%) Time: 1.1 seconds, Memory: 4.25MB There was 1 failure: 1) tests\DemoTest::testIndex A request...