File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ protected function setUp()
61
61
$ this ->entityManager ->method ('getRepository ' )->willReturn ($ this ->repository );
62
62
$ this ->entityManager ->method ('getClassMetadata ' )->willReturn ($ this ->metadata );
63
63
64
+ $ this ->metadata ->method ('getName ' )->willReturn ($ this ->className );
64
65
$ this ->metadata ->method ('getIdentifierValues ' )->willReturn (array ('id ' => $ this ->identifier ));
65
66
66
67
$ this ->metadata ->isIdentifierComposite = false ;
@@ -86,6 +87,15 @@ public function testTransform()
86
87
$ this ->assertSame ($ this ->identifier , $ identifier );
87
88
}
88
89
90
+ public function testTransformAlias ()
91
+ {
92
+ $ transformer = new EntityToIdentifierTransformer ($ this ->entityManager , 'AppBundle:City ' );
93
+
94
+ $ identifier = $ transformer ->transform ($ this ->entity );
95
+
96
+ $ this ->assertSame ($ this ->identifier , $ identifier );
97
+ }
98
+
89
99
public function testTransformNull ()
90
100
{
91
101
$ transformer = new EntityToIdentifierTransformer ($ this ->entityManager , $ this ->className );
You can’t perform that action at this time.
0 commit comments