Skip to content

Commit

Permalink
Fix issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbaudry committed Mar 10, 2015
1 parent 8b29559 commit 564f687
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ public function toJSON()
throw new PushwooshException('The \'hwid\' property is not set !');

}

// The 'pushToken' parameter must have been defined.
if (!isset($this->pushToken)) {
throw new PushwooshException('The \'pushToken\' property is not set !');

}

$json = array(
'application' => $this->application,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,6 @@ public function testToJSON()

// Test without the 'timezone' parameter set
$registerDeviceRequest->setPushToken('PUSH_TOKEN');
try {
$registerDeviceRequest->toJSON();
$this->fail('Must have thrown a PushwooshException !');

} catch (PushwooshException $pe) {
// Expected

}

$registerDeviceRequest->setTimezone(3600);

// Test without the 'language' parameter set
Expand Down

0 comments on commit 564f687

Please sign in to comment.