2525use Doctrine \DBAL \Schema \Metadata \TableMetadataRow ;
2626use FOD \DBALClickHouse \ClickHouseMetadataProvider ;
2727use FOD \DBALClickHouse \ClickHousePlatform ;
28- use FOD \DBALClickHouse \ClickHouseViewMetadataRow ;
2928use PHPUnit \Framework \TestCase ;
3029
3130/**
3231 * ClickHouse DBAL test class. Testing work with public methods of FOD\DBALClickHouse\ClickHouseMetadataProvider class
3332 */
34- class MetadataProviderTest extends TestCase
33+ class ClickHouseMetadataProviderTest extends TestCase
3534{
3635 private ClickHouseMetadataProvider $ metadataProvider ;
3736 private Connection $ connection ;
@@ -40,9 +39,9 @@ public function setUp(): void
4039 {
4140 $ this ->connection = CreateConnectionTest::createConnection ();
4241 $ platform = $ this ->connection ->getDatabasePlatform ();
43-
42+
4443 $ this ->metadataProvider = new ClickHouseMetadataProvider ($ this ->connection , $ platform );
45-
44+
4645 // Create test tables for testing
4746 $ this ->createTestTables ();
4847 }
@@ -108,7 +107,7 @@ public function testGetAllTableNames(): void
108107 $ this ->assertNull ($ row ->getSchemaName ());
109108 $ this ->assertIsString ($ row ->getTableName ());
110109 $ this ->assertEmpty ($ row ->getOptions ());
111-
110+
112111 if ($ row ->getTableName () === 'test_metadata_table ' ) {
113112 $ testTableFound = true ;
114113 }
@@ -136,7 +135,7 @@ public function testGetTableColumnsForAllTables(): void
136135 $ this ->assertNull ($ row ->getSchemaName ());
137136 $ this ->assertSame ('test_metadata_table ' , $ row ->getTableName ());
138137 $ this ->assertNotNull ($ row ->getColumn ());
139-
138+
140139 $ column = $ row ->getColumn ();
141140 $ this ->assertIsString ($ column ->getName ());
142141 $ this ->assertNotNull ($ column ->getType ());
@@ -164,7 +163,7 @@ public function testGetTableColumnsForTable(): void
164163 $ this ->assertNull ($ row ->getSchemaName ());
165164 $ this ->assertSame ('test_metadata_table ' , $ row ->getTableName ());
166165 $ this ->assertNotNull ($ row ->getColumn ());
167-
166+
168167 $ column = $ row ->getColumn ();
169168 $ columnNames [] = $ column ->getName ();
170169 }
@@ -279,7 +278,7 @@ public function testGetTableOptionsForAllTables(): void
279278 $ this ->assertNull ($ row ->getSchemaName ());
280279 $ this ->assertIsString ($ row ->getTableName ());
281280 $ this ->assertIsArray ($ row ->getOptions ());
282-
281+
283282 if ($ row ->getTableName () === 'test_metadata_table ' ) {
284283 $ testTable = $ row ;
285284 }
@@ -310,7 +309,7 @@ public function testGetTableOptionsForTable(): void
310309 $ this ->assertInstanceOf (TableMetadataRow::class, $ row );
311310 $ this ->assertNull ($ row ->getSchemaName ());
312311 $ this ->assertSame ('test_metadata_table ' , $ row ->getTableName ());
313-
312+
314313 $ options = $ row ->getOptions ();
315314 $ this ->assertArrayHasKey ('engine ' , $ options );
316315 $ this ->assertSame ('MergeTree ' , $ options ['engine ' ]);
@@ -326,11 +325,10 @@ public function testGetAllViews(): void
326325 // Find our test view
327326 $ testView = null ;
328327 foreach ($ results as $ row ) {
329- $ this ->assertInstanceOf (ClickHouseViewMetadataRow ::class, $ row );
328+ $ this ->assertInstanceOf (ViewMetadataRow ::class, $ row );
330329 $ this ->assertNull ($ row ->getSchemaName ());
331330 $ this ->assertIsString ($ row ->getViewName ());
332- $ this ->assertIsString ($ row ->getSql ());
333-
331+
334332 if ($ row ->getViewName () === 'test_metadata_view ' ) {
335333 $ testView = $ row ;
336334 }
0 commit comments