We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29ee0e2 commit 3d805f4Copy full SHA for 3d805f4
tests/LoggerCheckTest.php
@@ -3,6 +3,7 @@
3
namespace YdbPlatform\Ydb\Test;
4
5
use PHPUnit\Framework\TestCase;
6
+use YdbPlatform\Ydb\Auth\Implement\AnonymousAuthentication;
7
use YdbPlatform\Ydb\Logger\NullLogger;
8
use YdbPlatform\Ydb\Logger\SimpleStdLogger;
9
use YdbPlatform\Ydb\Ydb;
@@ -35,4 +36,13 @@ public function testCheckUseNullLogger(){
35
36
$ydb = new Ydb($config);
37
$this->assertInstanceOf(NullLogger::class, $ydb->getLogger());
38
}
39
+
40
+ public function testThrowExceptionOnNonLoggerObject(){
41
+ $config = [
42
+ 'logger' => new AnonymousAuthentication()
43
+ ];
44
+ $this->expectException('TypeError');
45
+ $ydb = new Ydb($config);
46
+ $this->assertInstanceOf(NullLogger::class, $ydb->getLogger());
47
+ }
48
0 commit comments