Skip to content

Commit f7dd72e

Browse files
committed
Fixed failing tests.
1 parent 99e2529 commit f7dd72e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/wpgraphql-logging/tests/wpunit/Logger/Database/DatabaseEntityTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function test_save_method_inserts_log_into_database(): void
8282
$this->assertIsInt( $insert_id );
8383
$this->assertGreaterThan(0, $insert_id, 'The save method should return a positive insert ID.');
8484

85-
$entity = DatabaseEntity::find($insert_id);
85+
$entity = DatabaseEntity::find_by_id($insert_id);
8686
$this->assertInstanceOf(DatabaseEntity::class, $entity, 'The find method should return an instance of DatabaseEntity.');
8787
$this->assertEquals($log_data['channel'], $entity->get_channel(), 'The channel should match the saved data.');
8888
$this->assertEquals($log_data['level'], $entity->get_level(), 'The level should match the saved data.');
@@ -98,8 +98,8 @@ public function test_save_method_inserts_log_into_database(): void
9898

9999
public function test_find_returns_null_for_nonexistent_id(): void
100100
{
101-
$entity = DatabaseEntity::find(999999);
102-
$this->assertNull($entity, 'find() should return null for a non-existent ID.');
101+
$entity = DatabaseEntity::find_by_id(999999);
102+
$this->assertNull($entity, 'find_by_id() should return null for a non-existent ID.');
103103
}
104104

105105
/**

0 commit comments

Comments
 (0)