Doctrine\MongoDB\Tests\ConnectionFunctionalTest::testDriverOptions PHP Метод

testDriverOptions() публичный Метод

public testDriverOptions ( )
    public function testDriverOptions()
    {
        if (!extension_loaded('mongo')) {
            $this->markTestSkipped('Test will not work with polyfills for ext-mongo');
        }
        $callCount = 0;
        $streamContext = stream_context_create(['mongodb' => ['log_cmd_delete' => function () use(&$callCount) {
            $callCount++;
        }]]);
        $connection = new Connection(null, [], null, null, ['context' => $streamContext]);
        $connection->selectCollection('test', 'collection')->remove([]);
        $this->assertSame(1, $callCount);
    }
ConnectionFunctionalTest