function testProductionProblems()
 {
     # Open to a place where we should not have write access.
     $client = new Client("oq0vdlg7yi", array("consumer" => "file", "filename" => "/dev/xxxxxxx"));
     $tracked = $client->track(array("userId" => "some-user", "event" => "my event"));
     $this->assertFalse($tracked);
 }
 function testLargeMessage()
 {
     $options = array("debug" => true, "consumer" => "socket");
     $client = new Client("testsecret", $options);
     $big_property = "";
     for ($i = 0; $i < 10000; $i++) {
         $big_property .= "a";
     }
     $this->assertTrue($client->track(array("userId" => "some-user", "event" => "Super Large PHP Event", "properties" => array("big_property" => $big_property))));
     $client->__destruct();
 }
Example #3
0
 /**
  * Flush the client
  */
 public static function flush()
 {
     self::checkClient();
     self::$client->flush();
 }