bind() public method

public bind ( $taintedData )
 public function testCollectionOfFieldGroupsBoundWithArrayObjectContainingObjects()
 {
     $fieldGroup = new FieldGroup('name');
     $fieldGroup->add(new TestField('first'));
     $fieldGroup->add(new TestField('last'));
     $field = new CollectionField($fieldGroup);
     $nameData = (object) array('first' => 'Foo', 'last' => 'Bar');
     $collectionData = new \ArrayObject(array($nameData));
     $field->setData($collectionData);
     $boundNameData = (object) array('first' => 'Foo', 'last' => 'Baz');
     $boundCollectionData = new \ArrayObject(array($nameData));
     $field->bind($boundCollectionData);
     $this->assertTrue($field->has('0'));
     $this->assertFalse($field->has('1'));
     $this->assertEquals($boundNameData, $field[0]->getData());
 }
 public function testResizedIfBoundWithExtraDataAndModifiable()
 {
     $field = new CollectionField(new TestField('emails'), array('modifiable' => true));
     $field->setData(array('*****@*****.**'));
     $field->bind(array('*****@*****.**', '*****@*****.**'));
     $this->assertTrue($field->has('0'));
     $this->assertTrue($field->has('1'));
     $this->assertEquals('*****@*****.**', $field[0]->getData());
     $this->assertEquals('*****@*****.**', $field[1]->getData());
 }