public function testInitShorthandEntityName()
 {
     $item1 = new SingleIntIdEntity(1, 'Foo');
     $item2 = new SingleIntIdEntity(2, 'Bar');
     $this->em->persist($item1);
     $this->em->persist($item2);
     $choiceList = new EntityChoiceList($this->em, 'SymfonyTestsDoctrine:SingleIntIdEntity');
     $this->assertEquals(array(1, 2), $choiceList->getValuesForChoices(array($item1, $item2)));
     $this->assertEquals(array(1, 2), $choiceList->getIndicesForChoices(array($item1, $item2)));
 }
 public function testPossibleToProvideShorthandEntityName()
 {
     $shorthandName = 'SymfonyTestsDoctrine:SingleIdentEntity';
     $item1 = new SingleIdentEntity(1, 'Foo');
     $item2 = new SingleIdentEntity(2, 'Bar');
     $this->em->persist($item1);
     $this->em->persist($item2);
     $choiceList = new EntityChoiceList($this->em, $shorthandName, null, null, null, null);
     $this->assertEquals(array(1, 2), $choiceList->getValuesForChoices(array($item1, $item2)));
     $this->assertEquals(array(1, 2), $choiceList->getIndicesForChoices(array($item1, $item2)));
 }