1515use Doctrine \DBAL \Platforms \AbstractPlatform ;
1616use Doctrine \DBAL \Query \QueryBuilder ;
1717use Doctrine \DBAL \Result ;
18+ use Doctrine \DBAL \Schema \AbstractSchemaManager ;
1819use Doctrine \DBAL \Schema \Column ;
1920use Doctrine \DBAL \Schema \Schema ;
20- use Doctrine \DBAL \Schema \SQLiteSchemaManager ;
21- use Doctrine \DBAL \Schema \SqliteSchemaManager as LowestSqliteSchemaManager ;
2221use Doctrine \DBAL \Schema \Table ;
2322use PHPUnit \Framework \TestCase ;
2423use Symfony \AI \Chat \Bridge \Doctrine \DoctrineDbalMessageStore ;
@@ -51,7 +50,7 @@ public function testMessageStoreTableCannotBeSetupIfItAlreadyExist()
5150 $ schema = $ this ->createMock (Schema::class);
5251 $ schema ->expects ($ this ->once ())->method ('hasTable ' )->willReturn (true );
5352
54- $ sqliteSchemaManager = $ this ->createMock (class_exists (LowestSqliteSchemaManager::class) ? LowestSqliteSchemaManager::class : SQLiteSchemaManager ::class);
53+ $ sqliteSchemaManager = $ this ->createMock (AbstractSchemaManager ::class);
5554 $ sqliteSchemaManager ->expects ($ this ->once ())->method ('introspectSchema ' )->willReturn ($ schema );
5655
5756 $ connection = $ this ->createMock (Connection::class);
@@ -79,7 +78,7 @@ public function testMessageStoreTableCanBeSetup()
7978 $ schema ->expects ($ this ->once ())->method ('createTable ' )->with ('foo ' )->willReturn ($ table );
8079 $ schema ->expects ($ this ->once ())->method ('toSql ' )->with ($ platform )->willReturn ([]);
8180
82- $ sqliteSchemaManager = $ this ->createMock (class_exists (LowestSqliteSchemaManager::class) ? LowestSqliteSchemaManager::class : SQLiteSchemaManager ::class);
81+ $ sqliteSchemaManager = $ this ->createMock (AbstractSchemaManager ::class);
8382 $ sqliteSchemaManager ->expects ($ this ->once ())->method ('introspectSchema ' )->willReturn ($ schema );
8483
8584 $ connection = $ this ->createMock (Connection::class);
@@ -98,7 +97,7 @@ public function testMessageStoreTableCannotBeDroppedIfTableDoesNotExist()
9897 $ schema = $ this ->createMock (Schema::class);
9998 $ schema ->expects ($ this ->once ())->method ('hasTable ' )->willReturn (false );
10099
101- $ sqliteSchemaManager = $ this ->createMock (class_exists (LowestSqliteSchemaManager::class) ? LowestSqliteSchemaManager::class : SQLiteSchemaManager ::class);
100+ $ sqliteSchemaManager = $ this ->createMock (AbstractSchemaManager ::class);
102101 $ sqliteSchemaManager ->expects ($ this ->once ())->method ('introspectSchema ' )->willReturn ($ schema );
103102
104103 $ connection = $ this ->createMock (Connection::class);
@@ -118,7 +117,7 @@ public function testMessageStoreTableCanBeDropped()
118117 $ schema = $ this ->createMock (Schema::class);
119118 $ schema ->expects ($ this ->once ())->method ('hasTable ' )->willReturn (true );
120119
121- $ sqliteSchemaManager = $ this ->createMock (class_exists (LowestSqliteSchemaManager::class) ? LowestSqliteSchemaManager::class : SQLiteSchemaManager ::class);
120+ $ sqliteSchemaManager = $ this ->createMock (AbstractSchemaManager ::class);
122121 $ sqliteSchemaManager ->expects ($ this ->once ())->method ('introspectSchema ' )->willReturn ($ schema );
123122
124123 $ connection = $ this ->createMock (Connection::class);
0 commit comments