Skip to content

Commit

Permalink
Test function rpcf_search_users_new, issue #24, #11
Browse files Browse the repository at this point in the history
  • Loading branch information
k-shym committed Aug 5, 2018
1 parent 8c7d689 commit 3094365
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/URFAClient53Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ public function test_rpcf_get_userinfo(array $user)
$this->assertEquals('pass' . self::prefix(), $result['password']);
}

/**
* @depends test_rpcf_add_user_new
*/
public function test_rpcf_search_users_new(array $user)
{
$result = $this->_api->rpcf_search_users_new(array(
'select_type' => 0,
'patterns_count' => array(
array(
'what' => 2,
'criteria_id' => 3,
'pattern' => 'user' . self::prefix(),
),
),
));

$this->assertArrayHasKey('user_data_size', $result);
$this->assertTrue(count($result['user_data_size']) === 1);
$result = $result['user_data_size'][0];
$this->assertEquals($user['user_id'], $result['user_id']);
$this->assertEquals($user['basic_account'], $result['basic_account']);
$this->assertEquals('user' . self::prefix(), $result['login']);
}

/**
* @depends test_rpcf_add_user_new
* @throws Exception
Expand Down

0 comments on commit 3094365

Please sign in to comment.