1 | <?php |
||
6 | class NestedSetTest |
||
7 | extends \PHPUnit_Framework_TestCase |
||
|
|||
8 | { |
||
9 | public function factoryDataProvider() |
||
10 | { |
||
11 | return array( |
||
12 | array( |
||
13 | '\Zend\Db\Adapter\Adapter', |
||
14 | '\StefanoTree\NestedSet\Adapter\Zend2', |
||
15 | ), |
||
16 | array( |
||
17 | '\Doctrine\DBAL\Connection', |
||
18 | '\StefanoTree\NestedSet\Adapter\Doctrine2DBAL', |
||
19 | ), |
||
20 | // array( // todo |
||
21 | // '\Zend_Db_Adapter_Abstract', |
||
22 | // '\StefanoTree\NestedSet\Adapter\Zend1DbAdapter', |
||
23 | // ), |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @dataProvider factoryDataProvider |
||
29 | */ |
||
30 | public function testFactoryMethod($dbAdapterClass, $expectedAdapterClass) |
||
40 | |||
41 | public function testThrowExceptionIfYouDbAdapterIsNotSupporter() |
||
51 | } |
||
52 |