c33s / codeception-modules
Codeception Module Collection
0.3.0
2022-08-02 12:08 UTC
Requires
- php: ^7.4|^8.0
- codeception/codeception: ^4.0|^5.0
Requires (Dev)
- codeception/module-asserts: ^1.3.1|^2.0.0
- codeception/module-symfony: *
- doctrine/orm: *
- doctrine/persistence: *
- nesbot/carbon: *
- roave/security-advisories: dev-latest
- symfony/browser-kit: *
- symfony/dependency-injection: *
- symfony/http-foundation: *
- symfony/http-kernel: *
- symfony/security-bundle: *
- symfony/var-dumper: *
Conflicts
- codeception/codeception: <4.0
This package is auto-updated.
Last update: 2024-12-17 03:35:44 UTC
README
This is a collection of multiple codeception modules:
- CarbonDate
- Symfony
Modules
CarbonDate
Carbon is an API extension for DateTime which can be used to simulate a date. This module is its codeception integration.
- https://packagist.org/packages/nesbot/carbon
- https://carbon.nesbot.com/docs/ (Testing Aids)
- https://packagist.org/packages/kylekatarnls/carbonite
final class DevelopmentCest
{
public function testOnlySpecificVersion(IntegrationTester $I)
{
$I->assertNotEquals('2010-05-10 14:00:00', new Carbon());
$I->simulateCurrentDateAs('2010-05-10 14:00:00');
$I->assertEquals('2010-05-10 14:00:00', new Carbon());
$I->stopSimulatingCurrentDate();
$I->assertNotEquals('2010-05-10 14:00:00', new Carbon());
}
}
Symfony
Can be used as replacement of codeception/module-symfony (which is extended) by this module:
modules:
enabled:
- \C33s\Codeception\Module\Symfony
or can be integrated per trait in the Helpers for use with the official Symfony module.
tests/_support/Helper/Functional.php
:
use C33s\Codeception\Traits\SymfonyModuleTrait;
use Codeception\Module;
class Functional extends Module
{
use SymfonyModuleTrait;
//...
}