Exemplo n.º 1
0
 /**
  * Set the server array to the test values, check the current url
  *
  * @dataProvider currentUrlProvider
  * @param array $serverData
  * @param array $options
  * @param string $expected - the url expected
  * @param string $message - fail message
  */
 public function testCurrentUrl($serverVars, $options, $expected, $message)
 {
     $_SERVER = $serverVars;
     $client = new Dummy_Raven_Client($options);
     $result = $client->test_get_current_url();
     $this->assertSame($expected, $result, $message);
 }
Exemplo n.º 2
0
 public function testSendCallback()
 {
     $client = new Dummy_Raven_Client(array('send_callback' => array($this, 'cb1')));
     $client->captureMessage('test');
     $events = $client->getSentEvents();
     $this->assertEquals(0, count($events));
     $client = new Dummy_Raven_Client(array('send_callback' => array($this, 'cb2')));
     $client->captureMessage('test');
     $events = $client->getSentEvents();
     $this->assertEquals(1, count($events));
 }
Exemplo n.º 3
0
 public function testDefaultProcessorsContainSanitizeDataProcessor()
 {
     $client = new Dummy_Raven_Client();
     $defaults = $client->getDefaultProcessors();
     $this->assertTrue(in_array('Raven_SanitizeDataProcessor', $defaults));
 }