Skip to content

Commit

Permalink
Update events
Browse files Browse the repository at this point in the history
  • Loading branch information
marysieek committed Mar 9, 2021
1 parent c58660c commit b160c2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -75,7 +75,7 @@ $context = Castle_RequestContext::extractJson();
$context = Castle_RequestContext::extractJson();
$event = array(
'user_id' => 1,
'event' => '$login.succeeded'
'event' => '$login'
);

// Now, push this data to your async worker, eg.
Expand Down
4 changes: 2 additions & 2 deletions test/CastleTest.php
Expand Up @@ -22,7 +22,7 @@ public function testSetApiKey()
public function testTrack()
{
Castle_RequestTransport::setResponse(204, '');
Castle::track(array('event' => '$login.failed'));
Castle::track(array('event' => '$login'));
$this->assertRequest('post', '/track');
}

Expand All @@ -31,7 +31,7 @@ public function testAuthenticate()
Castle_RequestTransport::setResponse(201, '{ "status": "approve" }');
$auth = Castle::authenticate(Array(
'user_id' => '1',
'event' => '$login.failed'
'event' => '$login'
));
$this->assertRequest('post', '/authenticate');
$this->assertEquals($auth->status, 'approve');
Expand Down

0 comments on commit b160c2a

Please sign in to comment.