[Form] Removed invalid tests introduced again upon merge
This commit is contained in:
parent
e08252897a
commit
a1cd8ae5d9
@ -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