File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
tests/phpunit/tests/connectors Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -381,4 +381,16 @@ public function test_get_instance_returns_same_instance() {
381381
382382 $ this ->assertSame ( $ instance1 , $ instance2 );
383383 }
384+
385+ /**
386+ * Test registration skips AI connectors when AI is not supported.
387+ */
388+ public function test_register_skips_when_ai_not_supported () {
389+ add_filter ( 'wp_supports_ai ' , '__return_false ' );
390+
391+ $ this ->registry ->register ( 'first ' , self ::$ default_args );
392+
393+ $ all = $ this ->registry ->get_all_registered ();
394+ $ this ->assertCount ( 0 , $ all );
395+ }
384396}
Original file line number Diff line number Diff line change @@ -64,17 +64,6 @@ public function test_each_connector_has_required_fields(): void {
6464 }
6565 }
6666
67- /**
68- * Tests connectors return an empty array when AI is not supported.
69- */
70- public function test_returns_empty_array_when_ai_not_supported (): void {
71- // Temporarily disable AI support for this test.
72- add_filter ( 'wp_supports_ai ' , '__return_false ' );
73-
74- $ settings = wp_get_connectors ();
75- $ this ->assertSame ( array (), $ settings );
76- }
77-
7867 /**
7968 * @ticket 64730
8069 */
You can’t perform that action at this time.
0 commit comments