@@ 102-114 (lines=13) @@ | ||
99 | $this->assertSame($this->eventDispatcher, $this->configManager->getEventDispatcher()); |
|
100 | } |
|
101 | ||
102 | public function testGetEntityMetadata() |
|
103 | { |
|
104 | $this->assertNull($this->configManager->getEntityMetadata('SomeUndefinedClass')); |
|
105 | ||
106 | $metadata = $this->getEntityMetadata(self::ENTITY_CLASS); |
|
107 | ||
108 | $this->metadataFactory->expects($this->once()) |
|
109 | ->method('getMetadataForClass') |
|
110 | ->with(self::ENTITY_CLASS) |
|
111 | ->willReturn($metadata); |
|
112 | ||
113 | $this->assertSame($metadata, $this->configManager->getEntityMetadata(self::ENTITY_CLASS)); |
|
114 | } |
|
115 | ||
116 | public function testGetFieldMetadata() |
|
117 | { |
|
@@ 848-861 (lines=14) @@ | ||
845 | $this->assertSame($model, $result); |
|
846 | } |
|
847 | ||
848 | public function testCreateConfigEntityModelForExistingModel() |
|
849 | { |
|
850 | $model = $this->createEntityConfigModel(self::ENTITY_CLASS); |
|
851 | ||
852 | $this->modelManager->expects($this->once()) |
|
853 | ->method('findEntityModel') |
|
854 | ->with(self::ENTITY_CLASS) |
|
855 | ->willReturn($model); |
|
856 | $this->modelManager->expects($this->never()) |
|
857 | ->method('createEntityModel'); |
|
858 | ||
859 | $result = $this->configManager->createConfigEntityModel(self::ENTITY_CLASS); |
|
860 | $this->assertSame($model, $result); |
|
861 | } |
|
862 | ||
863 | /** |
|
864 | * @dataProvider createConfigEntityModelProvider |