|
@@ -54,6 +54,7 @@ class CollectionFormTest extends TestCase
|
|
|
$form = $this->factory->create('collection', 'emails', array(
|
|
|
'type' => 'field',
|
|
|
'modifiable' => true,
|
|
|
+ 'prototype' => true,
|
|
|
));
|
|
|
$form->setData(array('foo@foo.com', 'foo@bar.com'));
|
|
|
|
|
@@ -83,6 +84,7 @@ class CollectionFormTest extends TestCase
|
|
|
$form = $this->factory->create('collection', 'emails', array(
|
|
|
'type' => 'field',
|
|
|
'modifiable' => true,
|
|
|
+ 'prototype' => true,
|
|
|
));
|
|
|
$form->setData(array('foo@bar.com'));
|
|
|
|
|
@@ -148,6 +150,17 @@ class CollectionFormTest extends TestCase
|
|
|
$this->assertEquals(array('foo@foo.com', 'bar@bar.com'), $form->getData());
|
|
|
}
|
|
|
|
|
|
+ public function testModifableButNoPrototype()
|
|
|
+ {
|
|
|
+ $form = $this->factory->create('collection', 'emails', array(
|
|
|
+ 'type' => 'field',
|
|
|
+ 'modifiable' => true,
|
|
|
+ 'prototype' => false,
|
|
|
+ ));
|
|
|
+
|
|
|
+ $this->assertFalse($form->has('$$name$$'));
|
|
|
+ }
|
|
|
+
|
|
|
public function testResizedDownIfBoundWithLessDataAndModifiable()
|
|
|
{
|
|
|
$form = $this->factory->create('collection', 'emails', array(
|