Skip to content

Commit

Permalink
Merge branch 'update-register'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Anderson committed Nov 25, 2014
2 parents 7fde495 + 24edb03 commit ddcdb1f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
23 changes: 16 additions & 7 deletions src/Credibility/DandB/DandB.php
Expand Up @@ -228,18 +228,27 @@ public function passwordChange($userToken, $oldPassword, $newPassword)
* @param $email
* @param $firstName
* @param $lastName
* @param $phone
* @param $password
* @param $acceptedTOS must be 1
* @return Response
*/
public function userRegister($email, $firstName, $lastName, $password, $acceptedTOS)
public function userRegister($email, $first_name, $last_name, $accepted_tos, $password='', $phone_number='', $address_line_1='', $address_line_2='', $address_line_3='', $city='', $state_code='', $postal_code='', $source='')
{
return $this->requester->runPost('/v1.1/user/register', array(
'first_name' => $firstName,
'last_name' => $lastName,
'email' => $email,
'password' => $password,
'accepted_tos' => $acceptedTOS
return $this->requester->runPost('/v1.1/user/register', compact(
'email',
'first_name',
'last_name',
'accepted_tos',
'password',
'phone_number',
'address_line_1',
'address_line_2',
'address_line_3',
'city',
'state_code',
'postal_code',
'source'
));
}

Expand Down
13 changes: 11 additions & 2 deletions tests/DandBTest.php
Expand Up @@ -133,6 +133,7 @@ public function testUserRegister()
$email = 'test@yopmail.com';
$firstName = 'Test';
$lastName = 'McTester';
$phone = '3235551234';
$password = 'Pass@123';
$acceptedTOS = 1;

Expand All @@ -141,12 +142,20 @@ public function testUserRegister()
'first_name' => $firstName,
'last_name' => $lastName,
'email' => $email,
'phone_number' => $phone,
'password' => $password,
'accepted_tos' => $acceptedTOS
'accepted_tos' => $acceptedTOS,
'address_line_1' => '',
'address_line_2' => '',
'address_line_3' => '',
'city' => '',
'state_code' => '',
'postal_code' => '',
'source' => ''
)
);

$this->dandb->userRegister($email, $firstName, $lastName, $password, $acceptedTOS);
$this->dandb->userRegister($email, $firstName, $lastName, $acceptedTOS, $password, $phone);
}

public function testUserEntitlements()
Expand Down

0 comments on commit ddcdb1f

Please sign in to comment.