internations / testing-component
用于 Symfony 3 项目的测试辅助工具集合
1.4.0
2022-03-01 19:04 UTC
Requires
- php: >=7.1.3
Requires (Dev)
- doctrine/annotations: ^1.2
- internations/kodierungsregelwerksammlung: ~0.35
- phpunit/phpunit: ~7 || ~8 || ~9
- symfony/config: ^4.0
- symfony/css-selector: ~3
- symfony/dependency-injection: ^4.0
- symfony/dom-crawler: ^4.0 || ^5.0
- symfony/framework-bundle: ^4.0 || ^5.0
- symfony/http-kernel: ^4.0
- symfony/validator: ^4.0 || ^5.0
Suggests
- symfony/css-selector: Dependency for symfony/dom-crawler
- symfony/dom-crawler: Necessary to use DomCrawlerAssertionTrait
README
一个用于简化 Symfony3 项目测试的测试辅助工具集合。
基础测试类
<?php use InterNations\Component\Testing\AbstractTestCase; class MyTest extends AbstractTestCase { }
访问受限成员
<?php use InterNations\Component\Testing\AccessTrait; class MyTest ... { use AccessTrait; public function testSomething() { $this->setNonPublicProperty($this->sut, 'privateProperty', 'value'); $this->callNonPublicMethod($this->sut, 'protectedMethod', ['arg1', 'arg2']); } }