blob: 6ea2ccdfb04f16eee92c3b4a7e8a7dfd13eb8d69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Psecio\Gatekeeper;
class SecurityQuestionCollectionTest extends \Psecio\Gatekeeper\Base
{
/**
* Test the location of security questions of a user by ID
*/
public function testFindQuestionsByUserId()
{
$userId = 1;
$return = [
['question' => 'Arthur', 'answer' => 'Dent', 'user_id' => $userId],
['name' => 'Ford', 'description' => 'Prefect', 'user_id' => $userId]
];
$ds = $this->buildMock($return, 'fetch');
$questions = new SecurityQuestionCollection($ds);
$questions->findByUserId($userId);
$this->assertCount(2, $questions);
}
}
|