Browse Source

[Form] fixed unit test paths

Fabien Potencier 14 năm trước cách đây
mục cha
commit
30ccd0b794
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      tests/Symfony/Tests/Component/Form/FileFieldTest.php

+ 2 - 2
tests/Symfony/Tests/Component/Form/FileFieldTest.php

@@ -40,7 +40,7 @@ class FileFieldTest extends \PHPUnit_Framework_TestCase
             'tmp_dir' => self::$tmpDir,
         ));
 
-        $tmpPath = self::$tmpDir . '/' . md5(session_id() . '$secret$' . '12345');
+        $tmpPath = realpath(self::$tmpDir) . '/' . md5(session_id() . '$secret$' . '12345');
         $that = $this;
 
         $file = $this->getMock('Symfony\Component\HttpFoundation\File\UploadedFile', array(), array(), '', false);
@@ -91,7 +91,7 @@ class FileFieldTest extends \PHPUnit_Framework_TestCase
             'token' => '12345',
             'original_name' => 'original_name.jpg',
         ), $field->getDisplayedData());
-        $this->assertEquals($tmpPath, $field->getData());
+        $this->assertEquals(realpath($tmpPath), realpath($field->getData()));
     }
 
     public function testBindKeepsOldFileIfNotOverwritten()