freshp/phpunit-webtestcase-fixture-helper
Composer 安装命令:
composer require freshp/phpunit-webtestcase-fixture-helper
包简介
Helps to manage fixtures for test-environment in webtestcases.
README 文档
README
phpunit webtestcase doctrine fixture helper
This package can easily setup database for tests for dev or test-environments.
Uses doctrine FixtureInterface for edge to edge tests.
tasks:
- drop the current database
- create a new blank database for
devortestenvironment - migrate by forcing the doctrine schema update
- load all fixtures by given
FixtureInterface
usage
- create a FixtureInterface like the example class
example/Fixtures/DataFixtures/ORM/LoadFixtures.php - write a test-class like
example/Unit/Route/ExampleRouteTest.phpa extend from the given ApiTestCase - use static access to create the client for example in the
setUpBeforeClassor thesetUpmethodself::createClientWithDatabaseAndFixtures(new LoadFixtures());
统计信息
- 总下载量: 55
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-14