浏览代码

[Form] Fixed failing test

Bernhard Schussek 14 年之前
父节点
当前提交
bdd2c91abd
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      tests/Symfony/Tests/Component/Form/RepeatedFieldTest.php

+ 8 - 8
tests/Symfony/Tests/Component/Form/RepeatedFieldTest.php

@@ -29,18 +29,18 @@ class RepeatedFieldTest extends \PHPUnit_Framework_TestCase
     {
         $this->field->setData('foobar');
 
-        $this->assertEquals('foobar', $this->field['name']->getData());
-        $this->assertEquals('foobar', $this->field['name_repeat']->getData());
+        $this->assertEquals('foobar', $this->field['first']->getData());
+        $this->assertEquals('foobar', $this->field['second']->getData());
     }
 
     public function testBindUnequal()
     {
-        $input = array('name' => 'foo', 'name_repeat' => 'bar');
+        $input = array('first' => 'foo', 'second' => 'bar');
 
         $this->field->bind($input);
 
-        $this->assertEquals('foo', $this->field['name']->getDisplayedData());
-        $this->assertEquals('bar', $this->field['name_repeat']->getDisplayedData());
+        $this->assertEquals('foo', $this->field['first']->getDisplayedData());
+        $this->assertEquals('bar', $this->field['second']->getDisplayedData());
         $this->assertFalse($this->field->isFirstEqualToSecond());
         $this->assertEquals($input, $this->field->getDisplayedData());
         $this->assertEquals(null, $this->field->getData());
@@ -48,12 +48,12 @@ class RepeatedFieldTest extends \PHPUnit_Framework_TestCase
 
     public function testBindEqual()
     {
-        $input = array('name' => 'foo', 'name_repeat' => 'foo');
+        $input = array('first' => 'foo', 'second' => 'foo');
 
         $this->field->bind($input);
 
-        $this->assertEquals('foo', $this->field['name']->getDisplayedData());
-        $this->assertEquals('foo', $this->field['name_repeat']->getDisplayedData());
+        $this->assertEquals('foo', $this->field['first']->getDisplayedData());
+        $this->assertEquals('foo', $this->field['second']->getDisplayedData());
         $this->assertTrue($this->field->isFirstEqualToSecond());
         $this->assertEquals($input, $this->field->getDisplayedData());
         $this->assertEquals('foo', $this->field->getData());