tj09 / test-utils
Mocking utils for test cases.
Installs: 11
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tj09/test-utils
Requires
- php: >=8
- phpunit/phpunit: ^10.0 || ^11.0 || ^12.0
Requires (Dev)
- mikey179/vfsstream: ^1.6.0
README
Some common test utils used across projects. Likely not useful outside of projects that happen to use them.
Includes:
- MockFunctions A wrapper around
uopzto make it easy-ish to stub out functions in tests. - BaseTestCase Test case class that will clear mocks and APC after each test.
- TestPDO Allows copying an existing database's schema into temporary tables in another database, presenting a clean slate for tests.
- TestWithSnapshots Provides assertions for tests to assert that some data matches a previously-recorded state.