Fix tests: Update Admin class to match test expectations and use correct WP_Mock assertions

This commit is contained in:
2025-04-18 18:58:47 +01:00
parent aa136c7a4a
commit c7435f5a49
2 changed files with 25 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ class AdminTest extends \WP_Mock\Tools\TestCase {
public function test_constructor() {
// Verify that the constructor initializes hooks
$this->assertInstanceOf(Admin::class, $this->admin);
$this->assertTrue(WP_Mock::onActionAdded('admin_enqueue_scripts'));
WP_Mock::assertActionAdded('admin_enqueue_scripts', [$this->admin, 'enqueue_admin_assets']);
}