| @@ 50-71 (lines=22) @@ | ||
| 47 | $this->assertInstanceOf(LugLocaleResource::class, $this->resource); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function testDefaultState() |
|
| 51 | { |
|
| 52 | $this->assertSame('locale', $this->resource->getName()); |
|
| 53 | $this->assertSame(LocaleResource::DRIVER_DOCTRINE_ORM, $this->resource->getDriver()); |
|
| 54 | $this->assertSame('default', $this->resource->getDriverManager()); |
|
| 55 | $this->assertSame( |
|
| 56 | realpath(__DIR__.'/../../../../Component/Locale/Resources/Doctrine'), |
|
| 57 | $this->resource->getDriverMappingPath() |
|
| 58 | ); |
|
| 59 | $this->assertSame(LocaleResource::DRIVER_MAPPING_FORMAT_XML, $this->resource->getDriverMappingFormat()); |
|
| 60 | $this->assertSame([LocaleInterface::class], $this->resource->getInterfaces()); |
|
| 61 | $this->assertSame(Locale::class, $this->resource->getModel()); |
|
| 62 | $this->assertSame(Factory::class, $this->resource->getFactory()); |
|
| 63 | $this->assertSame(DoctrineORMRepository::class, $this->resource->getRepository()); |
|
| 64 | $this->assertSame(LocaleType::class, $this->resource->getForm()); |
|
| 65 | $this->assertSame(DoctrineORMLocaleChoiceType::class, $this->resource->getChoiceForm()); |
|
| 66 | $this->assertSame(Controller::class, $this->resource->getController()); |
|
| 67 | $this->assertSame(DomainManager::class, $this->resource->getDomainManager()); |
|
| 68 | $this->assertSame('code', $this->resource->getLabelPropertyPath()); |
|
| 69 | $this->assertSame('code', $this->resource->getIdPropertyPath()); |
|
| 70 | $this->assertNull($this->resource->getTranslation()); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function testMongoDBDriver() |
|
| 74 | { |
|
| @@ 55-73 (lines=19) @@ | ||
| 52 | $this->assertInstanceOf(Resource::class, $this->resource); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testDefaultState() |
|
| 56 | { |
|
| 57 | $this->assertSame('locale', $this->resource->getName()); |
|
| 58 | $this->assertSame(LocaleResource::DRIVER_DOCTRINE_ORM, $this->resource->getDriver()); |
|
| 59 | $this->assertSame('default', $this->resource->getDriverManager()); |
|
| 60 | $this->assertSame(realpath(__DIR__.'/../../Resources/Doctrine'), $this->resource->getDriverMappingPath()); |
|
| 61 | $this->assertSame(LocaleResource::DRIVER_MAPPING_FORMAT_XML, $this->resource->getDriverMappingFormat()); |
|
| 62 | $this->assertSame([LocaleInterface::class], $this->resource->getInterfaces()); |
|
| 63 | $this->assertSame(Locale::class, $this->resource->getModel()); |
|
| 64 | $this->assertSame(Factory::class, $this->resource->getFactory()); |
|
| 65 | $this->assertSame(DoctrineORMRepository::class, $this->resource->getRepository()); |
|
| 66 | $this->assertSame(LocaleType::class, $this->resource->getForm()); |
|
| 67 | $this->assertSame(DoctrineORMLocaleChoiceType::class, $this->resource->getChoiceForm()); |
|
| 68 | $this->assertSame($this->controller, $this->resource->getController()); |
|
| 69 | $this->assertSame(DomainManager::class, $this->resource->getDomainManager()); |
|
| 70 | $this->assertSame('code', $this->resource->getLabelPropertyPath()); |
|
| 71 | $this->assertSame('code', $this->resource->getIdPropertyPath()); |
|
| 72 | $this->assertNull($this->resource->getTranslation()); |
|
| 73 | } |
|
| 74 | ||
| 75 | public function testMongoDBDriver() |
|
| 76 | { |
|