MongoLogTest.php 618 B

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