55use MongoDB \Collection ;
66use MongoDB \Driver \Command ;
77use MongoDB \Driver \Exception \ServerException ;
8- use MongoDB \Exception \AtlasSearchNotSupportedException ;
8+ use MongoDB \Exception \SearchNotSupportedException ;
99use MongoDB \Tests \Collection \FunctionalTestCase ;
1010use PHPUnit \Framework \Attributes \DoesNotPerformAssertions ;
1111
12- class AtlasSearchNotSupportedExceptionTest extends FunctionalTestCase
12+ class SearchNotSupportedExceptionTest extends FunctionalTestCase
1313{
1414 #[DoesNotPerformAssertions]
1515 public function testListSearchIndexesNotSupportedException (): void
@@ -18,7 +18,7 @@ public function testListSearchIndexesNotSupportedException(): void
1818
1919 try {
2020 $ collection ->listSearchIndexes ();
21- } catch (AtlasSearchNotSupportedException ) {
21+ } catch (SearchNotSupportedException ) {
2222 // If an exception is thrown because Atlas Search is not supported,
2323 // then the test is successful because it has the correct exception class.
2424 }
@@ -31,7 +31,7 @@ public function testCreateSearchIndexNotSupportedException(): void
3131
3232 try {
3333 $ collection ->createSearchIndex (['mappings ' => ['dynamic ' => false ]], ['name ' => 'test-search-index ' ]);
34- } catch (AtlasSearchNotSupportedException ) {
34+ } catch (SearchNotSupportedException ) {
3535 // If an exception is thrown because Atlas Search is not supported,
3636 // then the test is successful because it has the correct exception class.
3737 }
@@ -47,7 +47,7 @@ public function testOtherStageNotFound(): void
4747 ]);
4848 self ::fail ('Expected ServerException was not thrown ' );
4949 } catch (ServerException $ exception ) {
50- self ::assertNotInstanceOf (AtlasSearchNotSupportedException ::class, $ exception , $ exception );
50+ self ::assertNotInstanceOf (SearchNotSupportedException ::class, $ exception , $ exception );
5151 }
5252 }
5353
@@ -57,7 +57,7 @@ public function testOtherCommandNotFound(): void
5757 $ this ->manager ->executeCommand ($ this ->getDatabaseName (), new Command (['nonExistingCommand ' => 1 ]));
5858 self ::fail ('Expected ServerException was not thrown ' );
5959 } catch (ServerException $ exception ) {
60- self ::assertFalse (AtlasSearchNotSupportedException:: isAtlasSearchNotSupportedError ($ exception ));
60+ self ::assertFalse (SearchNotSupportedException:: isSearchNotSupportedError ($ exception ));
6161 }
6262 }
6363}
0 commit comments