/** * @group 3735 */ public function testInjectsFormElementManagerToFormComposedByFormFactoryAwareElement() { $factory = new Factory(); $this->manager->setFactory('my-form', function ($elements) use($factory) { $form = new Form(); $form->setFormFactory($factory); return $form; }); $form = $this->manager->get('my-Form'); $this->assertSame($factory, $form->getFormFactory()); $this->assertSame($this->manager, $form->getFormFactory()->getFormElementManager()); }
public function testCanComposeFactory() { $factory = new Factory(); $this->form->setFormFactory($factory); $this->assertSame($factory, $this->form->getFormFactory()); }