@@ -30,7 +30,7 @@ protected function setUp(): void
3030 public function testRegisterProviderWithValidProvider (): void
3131 {
3232 $ this ->registry ->registerProvider (MockProvider::class);
33-
33+
3434 $ this ->assertTrue ($ this ->registry ->hasProvider ('mock ' ));
3535 $ this ->assertTrue ($ this ->registry ->hasProvider (MockProvider::class));
3636 $ this ->assertEquals (MockProvider::class, $ this ->registry ->getProviderClassName ('mock ' ));
@@ -45,7 +45,7 @@ public function testRegisterProviderWithNonExistentClass(): void
4545 {
4646 $ this ->expectException (InvalidArgumentException::class);
4747 $ this ->expectExceptionMessage ('Provider class does not exist: NonExistentProvider ' );
48-
48+
4949 $ this ->registry ->registerProvider ('NonExistentProvider ' );
5050 }
5151
@@ -69,7 +69,7 @@ public function testGetProviderClassNameWithUnregisteredProvider(): void
6969 {
7070 $ this ->expectException (InvalidArgumentException::class);
7171 $ this ->expectExceptionMessage ('Provider not registered: nonexistent ' );
72-
72+
7373 $ this ->registry ->getProviderClassName ('nonexistent ' );
7474 }
7575
@@ -81,7 +81,7 @@ public function testGetProviderClassNameWithUnregisteredProvider(): void
8181 public function testIsProviderConfiguredWithRegisteredProvider (): void
8282 {
8383 $ this ->registry ->registerProvider (MockProvider::class);
84-
84+
8585 $ this ->assertTrue ($ this ->registry ->isProviderConfigured ('mock ' ));
8686 $ this ->assertTrue ($ this ->registry ->isProviderConfigured (MockProvider::class));
8787 }
@@ -105,7 +105,7 @@ public function testFindModelsMetadataForSupportWithNoProviders(): void
105105 {
106106 $ requirements = new ModelRequirements ([CapabilityEnum::textGeneration ()], []);
107107 $ results = $ this ->registry ->findModelsMetadataForSupport ($ requirements );
108-
108+
109109 $ this ->assertIsArray ($ results );
110110 $ this ->assertEmpty ($ results );
111111 }
@@ -118,10 +118,10 @@ public function testFindModelsMetadataForSupportWithNoProviders(): void
118118 public function testFindModelsMetadataForSupportWithRegisteredProvider (): void
119119 {
120120 $ this ->registry ->registerProvider (MockProvider::class);
121-
121+
122122 $ requirements = new ModelRequirements ([CapabilityEnum::textGeneration ()], []);
123123 $ results = $ this ->registry ->findModelsMetadataForSupport ($ requirements );
124-
124+
125125 $ this ->assertIsArray ($ results );
126126 // Should now find models that match the text generation requirement
127127 $ this ->assertNotEmpty ($ results );
@@ -136,10 +136,10 @@ public function testFindModelsMetadataForSupportWithRegisteredProvider(): void
136136 public function testFindProviderModelsMetadataForSupportWithRegisteredProvider (): void
137137 {
138138 $ this ->registry ->registerProvider (MockProvider::class);
139-
139+
140140 $ requirements = new ModelRequirements ([CapabilityEnum::textGeneration ()], []);
141141 $ results = $ this ->registry ->findProviderModelsMetadataForSupport ('mock ' , $ requirements );
142-
142+
143143 $ this ->assertIsArray ($ results );
144144 // Should now find models that match the text generation requirement
145145 $ this ->assertNotEmpty ($ results );
@@ -155,7 +155,7 @@ public function testFindProviderModelsMetadataForSupportWithUnregisteredProvider
155155 {
156156 $ this ->expectException (InvalidArgumentException::class);
157157 $ this ->expectExceptionMessage ('Provider not registered: nonexistent ' );
158-
158+
159159 $ requirements = new ModelRequirements ([CapabilityEnum::textGeneration ()], []);
160160 $ this ->registry ->findProviderModelsMetadataForSupport ('nonexistent ' , $ requirements );
161161 }
@@ -168,10 +168,10 @@ public function testFindProviderModelsMetadataForSupportWithUnregisteredProvider
168168 public function testGetProviderModelThrowsException (): void
169169 {
170170 $ this ->registry ->registerProvider (MockProvider::class);
171-
171+
172172 $ this ->expectException (InvalidArgumentException::class);
173173 $ this ->expectExceptionMessage ('Model not found: test-model ' );
174-
174+
175175 $ modelConfig = new \WordPress \AiClient \Providers \Models \DTO \ModelConfig ([]);
176176 $ this ->registry ->getProviderModel ('mock ' , 'test-model ' , $ modelConfig );
177177 }
@@ -184,10 +184,10 @@ public function testGetProviderModelThrowsException(): void
184184 public function testMultipleProviderRegistration (): void
185185 {
186186 $ this ->registry ->registerProvider (MockProvider::class);
187-
187+
188188 // Register another instance of the same provider (should update)
189189 $ this ->registry ->registerProvider (MockProvider::class);
190-
190+
191191 $ this ->assertTrue ($ this ->registry ->hasProvider ('mock ' ));
192192 $ this ->assertEquals (MockProvider::class, $ this ->registry ->getProviderClassName ('mock ' ));
193193 }
@@ -200,12 +200,12 @@ public function testMultipleProviderRegistration(): void
200200 public function testProviderInstanceCaching (): void
201201 {
202202 $ this ->registry ->registerProvider (MockProvider::class);
203-
203+
204204 // Call methods that create instances
205205 $ this ->assertTrue ($ this ->registry ->isProviderConfigured ('mock ' ));
206206 $ this ->assertTrue ($ this ->registry ->isProviderConfigured ('mock ' ));
207-
207+
208208 // Should not throw any errors and should reuse cached instance
209209 $ this ->addToAssertionCount (1 );
210210 }
211- }
211+ }
0 commit comments