Alcaeus\MongoDbAdapter\Tests\Mongo\MongoCollectionTest::testWriteConcernIsSetInDriver PHP Method

testWriteConcernIsSetInDriver() public method

    public function testWriteConcernIsSetInDriver()
    {
        $this->skipTestIf(extension_loaded('mongo'));
        $collection = $this->getCollection();
        $this->assertTrue($collection->setWriteConcern(2, 100));
        // Only way to check whether options are passed down is through debugInfo
        $writeConcern = $collection->getCollection()->__debugInfo()['writeConcern'];
        $this->assertSame(2, $writeConcern->getW());
        $this->assertSame(100, $writeConcern->getWtimeout());
    }
MongoCollectionTest