phariscope/doctrine-testing-tools
最新稳定版本:v1.3.8
Composer 安装命令:
composer require phariscope/doctrine-testing-tools
包简介
A PHP component to test Doctrine Repositories
关键字:
README 文档
README
A PHP component to help testing Doctrine SQL Repositories.
To reduce process time, this component will only drop requested tables using SQL queries. I only use it on MySQL and SQLite databases so I do not need this component to work with other solutions.
Usage
To use this component, you need to :
- Add DoctrineRepositoryTesterTrait to every doctrine repository tests.
- In
setUp(), call$this->initDoctrineTester()to initialize the tester. You now have access to :clearTables(array $tablesToClear)to clear every table you want to clear.getEntityManager()to access an instance of EntityManagerInterface for your repository.
Look into the ExempleRepositoryDoctrine if you need an exemple.
Install
composer require --dev phariscope/doctrine-testing-tools
To contribute to Doctrine Testing Tools
Requirements:
- docker
- git
Unit tests
bin/phpunit
Integration tests
bin/phpunit-integration
Quality
Some indicators:
- phpcs PSR12
- phpstan level 9
- coverage >= 100%
- infection MSI >= 100%
Quick check with:
./codecheck
Check coverage with:
bin/phpunit --coverage-html var
and view 'var/index.html' in your browser
Check infection with:
bin/infection
and view 'var/infection.html' in your browser
统计信息
- 总下载量: 7.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-19