devel/p5-Test-MockDateTime 0.02 DragonFly
Mock DateTime->now calls during tests
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- ART10, GPLv1+
- Categories
- devel, perl5
- Package size
- 7.1 KiB, 12.1 KiB installed
Description
Getting the current time sometimes is not very helpful for testing scenarios. Instead, if you could obtain a known value during the runtime of a testcase will make your results predictable.
Why another Date Mocker? I wanted something simple with a very concise usage pattern and a mocked date should only exist and stay constant inside a scope. After leaving the scope the current time should be back. This lead to this tiny module.
This simple module allows faking a given date and time for the runtime of a subsequent code block. By default the on keyword is exported into the namespace of the test file. The date to get mocked must be in a format that is recognized by DateTime::Format::DateParse.
In the other systems
The newest version among them is 0.02, as upstream numbers it.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| DragonFly | devel/p5-Test-MockDateTime | 0.02 newest | none known | - | [email protected] | - |
| FreeBSD | devel/p5-Test-MockDateTime | 0.02 newest | none known | - | [email protected] | - |
| HardenedBSD | devel/p5-Test-MockDateTime | 0.02 newest | no data | - | [email protected] | - |
| GhostBSD | devel/p5-Test-MockDateTime | 0.02 newest | no data | - | [email protected] | - |
Install
Binary package:
pkg install p5-Test-MockDateTime
From DPorts:
cd /usr/dports/devel/p5-Test-MockDateTime && make install clean
Dependency graph
Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.
Dependencies
Run dependencies 2
No port depends on this one.