diff --git a/composer.json b/composer.json index 8699814..a773c2e 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "cweagans/composer-patches": "^1.7", "doctrine/orm": "2.15.*", "fastybird/application-library": "dev-main", - "fastybird/datetime-factory": "^0.6", "fastybird/devices-module": "dev-main", "fastybird/metadata-library": "dev-main", "fastybird/tools-library": "dev-main", diff --git a/tests/cases/unit/DbTestCase.php b/tests/cases/unit/DbTestCase.php index 765511e..0077f3b 100644 --- a/tests/cases/unit/DbTestCase.php +++ b/tests/cases/unit/DbTestCase.php @@ -11,6 +11,7 @@ use FastyBird\DateTimeFactory; use FastyBird\Library\Application\Boot as ApplicationBoot; use FastyBird\Library\Application\Exceptions as ApplicationExceptions; +use FastyBird\Library\Application\Utilities as ApplicationUtilities; use IPub\DoctrineCrud; use Nette; use Nettrine\ORM as NettrineORM; @@ -70,6 +71,19 @@ public function setUp(): void DateTimeFactory\Factory::class, $dateTimeFactory, ); + + $dateTimeProvider = $this->createMock(ApplicationUtilities\DateTimeProvider::class); + $dateTimeProvider + ->method('getDate') + ->willReturn($dateTimeFactory->getNow()); + $dateTimeProvider + ->method('getTimestamp') + ->willReturn($dateTimeFactory->getNow()->getTimestamp()); + + $this->mockContainerService( + ApplicationUtilities\DateTimeProvider::class, + $dateTimeProvider, + ); } protected function registerDatabaseSchemaFile(string $file): void