mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
✅ N°8772 - FormBinding tests
This commit is contained in:
@@ -9,6 +9,7 @@ namespace Combodo\iTop\Test\UnitTest\Forms\IO;
|
||||
use Combodo\iTop\Forms\IO\FormBinding;
|
||||
use Combodo\iTop\Forms\IO\FormBlockIOException;
|
||||
use Combodo\iTop\Test\UnitTest\sources\Forms\AbstractFormsTest;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SARL
|
||||
@@ -133,4 +134,19 @@ class FormBindingTest extends AbstractFormsTest
|
||||
// Then
|
||||
$this->assertEquals([$oBindingO1ToO2, $oBindingO1ToO3], $oOutputIO1->GetBindingsToOutputs(), 'Must have bindings after BindToOutput');
|
||||
}
|
||||
|
||||
public function testSourceValueIsPropagatedToDestIO()
|
||||
{
|
||||
$oOutputIO1 = $this->GivenRawOutput('test1');
|
||||
$oInputIO1 = $this->GivenRawInput('test1');
|
||||
$oBinding = $oOutputIO1->BindToInput($oInputIO1);
|
||||
$oOutputIO1->SetValue(FormEvents::PRE_SET_DATA, 'The Value');
|
||||
|
||||
// When
|
||||
$oBinding->PropagateValues();
|
||||
|
||||
// Then
|
||||
$this->assertEquals('The Value', $oOutputIO1->GetValue(FormEvents::PRE_SET_DATA));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user