Alcaeus\MongoDbAdapter\Tests\Mongo\MongoClientTest::dataReadPreferenceOptionsAreInherited PHP Method

dataReadPreferenceOptionsAreInherited() public static method

    public static function dataReadPreferenceOptionsAreInherited()
    {
        $options = ['readPreference' => \MongoClient::RP_SECONDARY_PREFERRED, 'readPreferenceTags' => 'a:b'];
        $overriddenOptions = ['readPreference' => \MongoClient::RP_NEAREST, 'readPreferenceTags' => 'c:d'];
        $multipleTagsets = ['readPreference' => \MongoClient::RP_SECONDARY_PREFERRED, 'readPreferenceTags' => 'a:b,c:d'];
        return ['optionsArray' => ['options' => $options, 'uri' => 'mongodb://localhost', 'expectedTagsets' => [['a' => 'b']]], 'queryString' => ['options' => [], 'uri' => 'mongodb://localhost/?' . self::makeOptionString($options), 'expectedTagsets' => [['a' => 'b']]], 'multipleInQueryString' => ['options' => [], 'uri' => 'mongodb://localhost/?' . self::makeOptionString($options) . '&readPreferenceTags=c:d', 'expectedTagsets' => [['a' => 'b'], ['c' => 'd']]], 'overridden' => ['options' => $options, 'uri' => 'mongodb://localhost/?' . self::makeOptionString($overriddenOptions), 'expectedTagsets' => [['c' => 'd'], ['a' => 'b']]], 'multipleTagsetsOptions' => ['options' => $multipleTagsets, 'uri' => 'mongodb://localhost', 'expectedTagsets' => [['a' => 'b', 'c' => 'd']]], 'multipleTagsetsQueryString' => ['options' => null, 'uri' => 'mongodb://localhost/?' . self::makeOptionString($multipleTagsets), 'expectedTagsets' => [['a' => 'b', 'c' => 'd']]]];
    }