Skip to content

Commit 5fe7cab

Browse files
committed
Adds MysqlMetadataFactory integration test
Updates baseline Signed-off-by: Joey Smith <[email protected]> Signed-off-by: Joey Smith <[email protected]>
1 parent 3d38326 commit 5fe7cab

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
<code><![CDATA[ConfigProvider]]></code>
1313
</InvalidClass>
1414
</file>
15-
<file src="src/Container/MysqlMetadataFactory.php">
16-
<UnusedClass>
17-
<code><![CDATA[MysqlMetadataFactory]]></code>
18-
</UnusedClass>
19-
</file>
2015
<file src="src/Container/MysqliResultFactory.php">
2116
<UnusedParam>
2217
<code><![CDATA[$container]]></code>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpDbIntegrationTest\Adapter\Mysql\Container;
6+
7+
use PhpDb\Adapter\Mysql\Container\MysqlMetadataFactory;
8+
use PhpDb\Adapter\Mysql\Metadata\Source\MysqlMetadata;
9+
use PhpDb\Metadata\MetadataInterface;
10+
use PhpDbIntegrationTest\Adapter\Mysql\Container\TestAsset\SetupTrait;
11+
use PHPUnit\Framework\Attributes\CoversClass;
12+
use PHPUnit\Framework\Attributes\CoversMethod;
13+
use PHPUnit\Framework\TestCase;
14+
15+
#[CoversClass(MysqlMetadataFactory::class)]
16+
#[CoversMethod(MysqlMetadataFactory::class, '__invoke')]
17+
final class MysqlMetadataFactoryTest extends TestCase
18+
{
19+
use SetupTrait;
20+
21+
public function testFactoryReturnsMysqlMetadata(): void
22+
{
23+
$factory = new MysqlMetadataFactory();
24+
$metadata = $factory($this->container);
25+
self::assertInstanceOf(MetadataInterface::class, $metadata);
26+
self::assertInstanceOf(MysqlMetadata::class, $metadata);
27+
}
28+
}

0 commit comments

Comments
 (0)