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

testConvertToBson() public method

public testConvertToBson ( MongoBinData $bin )
$bin MongoBinData
    public function testConvertToBson(\MongoBinData $bin)
    {
        $this->skipTestUnless($bin instanceof TypeInterface);
        $bsonBinary = $bin->toBSONType();
        $this->assertInstanceOf('MongoDB\\BSON\\Binary', $bsonBinary);
        $this->assertSame('foo', $bsonBinary->getData());
        $this->assertSame(\MongoDB\BSON\Binary::TYPE_FUNCTION, $bsonBinary->getType());
    }