From 503cfb9b8769cd6c296c34fb1192185e55a529e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Fri, 6 Dec 2024 11:03:49 +0100 Subject: [PATCH] Tests: add basic test for dbal extension with minimal config --- tests/Cases/DI/DbalExtension.phpt | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/Cases/DI/DbalExtension.phpt diff --git a/tests/Cases/DI/DbalExtension.phpt b/tests/Cases/DI/DbalExtension.phpt new file mode 100644 index 0000000..0e06780 --- /dev/null +++ b/tests/Cases/DI/DbalExtension.phpt @@ -0,0 +1,34 @@ +withCompiler(static function (Compiler $compiler): void { + $compiler->addExtension('nettrine.dbal', new DbalExtension()); + $compiler->addConfig(Neonkit::load( + <<<'NEON' + nettrine.dbal: + connections: + default: + driver: pdo_sqlite + password: test + user: test + path: ":memory:" + NEON + )); + })->build(); + + Assert::type(Connection::class, $container->getByName('nettrine.dbal.connections.default.connection')); +});