forked from doctrine/mongodb-odm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigurationTest.php
28 lines (24 loc) · 1.07 KB
/
ConfigurationTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
namespace Doctrine\ODM\MongoDB\Tests;
use Doctrine\ODM\MongoDB\Configuration;
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionFactory;
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionGenerator;
class ConfigurationTest extends BaseTest
{
public function testDefaultPersistentCollectionFactory()
{
$c = new Configuration();
$factory = $c->getPersistentCollectionFactory();
$this->assertInstanceOf(PersistentCollectionFactory::class, $factory);
$this->assertSame($factory, $c->getPersistentCollectionFactory());
}
public function testDefaultPersistentCollectionGenerator()
{
$c = new Configuration();
$c->setPersistentCollectionDir(__DIR__ . '/../../../../PersistentCollections');
$c->setPersistentCollectionNamespace('PersistentCollections');
$generator = $c->getPersistentCollectionGenerator();
$this->assertInstanceOf(PersistentCollectionGenerator::class, $generator);
$this->assertSame($generator, $c->getPersistentCollectionGenerator());
}
}