public function testCreateViaForm()
 {
     $code = $this->fixCompile($this->compiler);
     eval($code);
     /** @var \Nette\DI\Container $container */
     $container = new \Container();
     $container->initialize();
     $form = new \Nette\Forms\Container();
     $this->assertInstanceOf('WebChemistry\\Forms\\Controls\\Multiplier', $form->addMultiplier('multiplier', function () {
     }));
     $form = new \Nette\Forms\Form();
     $this->assertInstanceOf('WebChemistry\\Forms\\Controls\\Multiplier', $form->addMultiplier('multiplier', function () {
     }));
 }
 public function testRegistration()
 {
     Multiplier::register();
     $form = new \Nette\Forms\Form();
     $this->assertInstanceOf('WebChemistry\\Forms\\Controls\\Multiplier', $form->addMultiplier('name', function () {
     }));
     $this->assertInstanceOf('WebChemistry\\Forms\\Controls\\Multiplier', $form['name']);
 }