コード例 #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);
 }
コード例 #2
0
ファイル: ClientTest.php プロジェクト: johannesnagl/raven-php
 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));
 }
コード例 #3
0
ファイル: ClientTest.php プロジェクト: rmoorman/raven-php
 public function testDefaultProcessorsContainSanitizeDataProcessor()
 {
     $client = new Dummy_Raven_Client();
     $defaults = $client->getDefaultProcessors();
     $this->assertTrue(in_array('Raven_SanitizeDataProcessor', $defaults));
 }