/**
  * Test that an event can be fetched
  */
 public function testEventCanBeFetched()
 {
     $this->storage->save(array('type' => 'event', 'sub_type' => 'conversion', 'action' => 'purchase', 'message' => 'Bob Smith just purchased a shoe', 'created' => date('Y-m-d H:i:s'), 'data' => array('foo' => 'bar')));
     $results = $this->storage->fetch(array('type' => 'event', 'sub_type' => 'conversion'));
     $this->assertTrue(1 == count($results));
     $this->assertTrue($results[0]['sub_type'] == 'conversion');
 }
Example #2
0
 /**
  * Test that a null event is fetched
  */
 public function testNullEventIsFetched()
 {
     $this->assertTrue(null === $this->storage->fetch(array()));
 }