Alcaeus\MongoDbAdapter\Tests\Mongo\MongoCodeTest::testCreateWithBsonObject PHP Method

testCreateWithBsonObject() public method

    public function testCreateWithBsonObject()
    {
        $this->skipTestUnless(in_array(TypeInterface::class, class_implements('MongoCode')));
        $bsonCode = new \MongoDB\BSON\Javascript('code', ['scope' => 'bleh']);
        $code = new \MongoCode($bsonCode);
        $this->assertAttributeSame('code', 'code', $code);
        $this->assertAttributeSame(['scope' => 'bleh'], 'scope', $code);
    }