2
0

CouchDBHandlerTest.php 768 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  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\Level;
  12. class CouchDBHandlerTest extends \Monolog\Test\MonologTestCase
  13. {
  14. public function testHandle()
  15. {
  16. $record = $this->getRecord(Level::Warning, 'test', ['data' => new \stdClass, 'foo' => 34]);
  17. $handler = new CouchDBHandler();
  18. try {
  19. $handler->handle($record);
  20. } catch (\RuntimeException $e) {
  21. $this->markTestSkipped('Could not connect to couchdb server on http://localhost:5984');
  22. }
  23. }
  24. }