CouchDBHandlerTest.php 756 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Handler;
  11. use Monolog\Test\TestCase;
  12. use Monolog\Logger;
  13. class CouchDBHandlerTest extends TestCase
  14. {
  15. public function testHandle()
  16. {
  17. $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34));
  18. $handler = new CouchDBHandler();
  19. try {
  20. $handler->handle($record);
  21. } catch (\RuntimeException $e) {
  22. $this->markTestSkipped('Could not connect to couchdb server on http://localhost:5984');
  23. }
  24. }
  25. }