MongoLogTest.php 609 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Alcaeus\MongoDbAdapter\Tests\Mongo;
  3. use Alcaeus\MongoDbAdapter\Tests\TestCase;
  4. class MongoLogTest extends Testcase
  5. {
  6. public function testSetCallback()
  7. {
  8. $foo = function () {
  9. };
  10. $this->assertTrue(\MongoLog::setCallback($foo));
  11. $this->assertSame($foo, \MongoLog::getCallback());
  12. }
  13. public function testLevel()
  14. {
  15. \MongoLog::setLevel(2);
  16. $this->assertSame(2, \MongoLog::getLevel(2));
  17. }
  18. public function testModule()
  19. {
  20. \MongoLog::setModule(2);
  21. $this->assertSame(2, \MongoLog::getModule(2));
  22. }
  23. }