merged branch bschussek/fix (PR #4478)
Commits -------d6e8001
Fixed mistake in UPGRADE filea1cd8ae
[Form] Removed invalid tests introduced again upon merge Discussion ---------- [Form] Fixed failing tests in master --------------------------------------------------------------------------- by travisbot at 2012-06-01T06:24:55Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1495799) (mergedd6e80012
intoe0825289
).
This commit is contained in:
commit
1541fe26e4
@ -628,12 +628,12 @@
|
|||||||
* The following methods in `FormBuilder` were deprecated and have a new
|
* The following methods in `FormBuilder` were deprecated and have a new
|
||||||
equivalent:
|
equivalent:
|
||||||
|
|
||||||
* `prependClientTransformer`: `addViewTransformer`
|
* `prependClientTransformer`: no new equivalent, consider using `addViewTransformer`
|
||||||
* `appendClientTransformer`: no new equivalent, consider using `addViewTransformer`
|
* `appendClientTransformer`: `addViewTransformer`
|
||||||
* `getClientTransformers`: `getViewTransformers`
|
* `getClientTransformers`: `getViewTransformers`
|
||||||
* `resetClientTransformers`: `resetViewTransformers`
|
* `resetClientTransformers`: `resetViewTransformers`
|
||||||
* `prependNormTransformer`: no new equivalent, consider using `addModelTransformer`
|
* `prependNormTransformer`: `addModelTransformer`
|
||||||
* `appendNormTransformer`: `addModelTransformer`
|
* `appendNormTransformer`: no new equivalent, consider using `addModelTransformer`
|
||||||
* `getNormTransformers`: `getModelTransformers`
|
* `getNormTransformers`: `getModelTransformers`
|
||||||
* `resetNormTransformers`: `resetModelTransformers`
|
* `resetNormTransformers`: `resetModelTransformers`
|
||||||
|
|
||||||
|
@ -243,22 +243,4 @@ class DateTimeTypeTest extends LocalizedTestCase
|
|||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$this->assertEquals('datetime', $view->getVar('type'));
|
$this->assertEquals('datetime', $view->getVar('type'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSubmit_invalidDateTimeSingleText()
|
|
||||||
{
|
|
||||||
$form = $this->factory->create('datetime', null, array(
|
|
||||||
'data_timezone' => 'UTC',
|
|
||||||
'user_timezone' => 'UTC',
|
|
||||||
'input' => 'datetime',
|
|
||||||
'widget' => 'single_text',
|
|
||||||
'invalid_message' => 'Customized invalid message',
|
|
||||||
));
|
|
||||||
|
|
||||||
$form->bind('2012-04-31 03:04:05');
|
|
||||||
|
|
||||||
$this->assertFalse($form->isValid());
|
|
||||||
$this->assertNull($form->getData());
|
|
||||||
$this->assertEquals('2012-04-31 03:04:05', $form->getClientData());
|
|
||||||
$this->assertEquals(array(new FormError('Customized invalid message', array())), $form->getErrors());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -547,22 +547,4 @@ class DateTypeTest extends LocalizedTestCase
|
|||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$this->assertEquals('date', $view->getVar('type'));
|
$this->assertEquals('date', $view->getVar('type'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInvalidDateWithSingleTextDateTime()
|
|
||||||
{
|
|
||||||
$form = $this->factory->create('date', null, array(
|
|
||||||
'data_timezone' => 'UTC',
|
|
||||||
'user_timezone' => 'UTC',
|
|
||||||
'widget' => 'single_text',
|
|
||||||
'input' => 'datetime',
|
|
||||||
'invalid_message' => 'Customized invalid message',
|
|
||||||
));
|
|
||||||
|
|
||||||
$form->bind('31.4.2012');
|
|
||||||
|
|
||||||
$this->assertFalse($form->isValid());
|
|
||||||
$this->assertNull($form->getData());
|
|
||||||
$this->assertEquals('31.4.2012', $form->getClientData());
|
|
||||||
$this->assertEquals(array(new FormError('Customized invalid message', array())), $form->getErrors());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user