Skip to content

Commit

Permalink
WIP UserTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriBouteille committed Mar 12, 2024
1 parent 1a6cd5b commit 92dfd62
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/WordPress/Models/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@ public function testFindOneByLoginWithExistingUser(): void
$this->checkFindOneResult($user, 'user_login', self::USER_LOGIN);
}

/**
* @return void
* @covers ::comments
*/
public function testComments(): void
{
$commentIds = [
self::factory()->comment->create([
'user_id' => self::$testingUserId,
]),
self::factory()->comment->create([
'user_id' => self::$testingUserId,
])
];

var_dump($commentIds);
$user = User::find(self::$testingUserId);
$this->assertCount(2, $user->comments);
}

/**
* @param User|null $user
* @param string $whereColumn
Expand Down

0 comments on commit 92dfd62

Please sign in to comment.