Alcaeus\MongoDbAdapter\Tests\Mongo\MongoRegexTest::testConvertToBson PHP Method

testConvertToBson() public method

public testConvertToBson ( MongoRegex $regex )
$regex MongoRegex
    public function testConvertToBson(\MongoRegex $regex)
    {
        $this->skipTestUnless($regex instanceof TypeInterface);
        $bsonRegex = $regex->toBSONType();
        $this->assertInstanceOf('MongoDB\\BSON\\Regex', $bsonRegex);
        $this->assertSame('abc', $bsonRegex->getPattern());
        $this->assertSame('i', $bsonRegex->getFlags());
    }