Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace OAuth2\Storage; |
| 4 | |
| 5 | use PHPUnit\Framework\TestCase; |
| 6 | |
| 7 | abstract class BaseTest extends TestCase |
| 8 | { |
| 9 | public function provideStorage() |
| 10 | { |
| 11 | $memory = Bootstrap::getInstance()->getMemoryStorage(); |
| 12 | $sqlite = Bootstrap::getInstance()->getSqlitePdo(); |
| 13 | $mysql = Bootstrap::getInstance()->getMysqlPdo(); |
| 14 | $postgres = Bootstrap::getInstance()->getPostgresPdo(); |
| 15 | $mongo = Bootstrap::getInstance()->getMongo(); |
| 16 | $mongoDb = Bootstrap::getInstance()->getMongoDB(); |
| 17 | $redis = Bootstrap::getInstance()->getRedisStorage(); |
| 18 | $cassandra = Bootstrap::getInstance()->getCassandraStorage(); |
| 19 | $dynamodb = Bootstrap::getInstance()->getDynamoDbStorage(); |
| 20 | $couchbase = Bootstrap::getInstance()->getCouchbase(); |
| 21 | |
| 22 | /* hack until we can fix "default_scope" dependencies in other tests */ |
| 23 | $memory->defaultScope = 'defaultscope1 defaultscope2'; |
| 24 | |
| 25 | return array( |
| 26 | array($memory), |
| 27 | array($sqlite), |
| 28 | array($mysql), |
| 29 | array($postgres), |
| 30 | array($mongo), |
| 31 | array($mongoDb), |
| 32 | array($redis), |
| 33 | array($cassandra), |
| 34 | array($dynamodb), |
| 35 | array($couchbase), |
| 36 | ); |
| 37 | } |
| 38 | } |