blob: e841d3ad2fb2ba3aa2f577c51d756c6686586c82 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2
3namespace OAuth2\Storage;
4
5use PHPUnit\Framework\TestCase;
6
7abstract 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}