Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Zend\Form] Adapt to latest changes in Zend\File

  • Loading branch information...
commit 8b9a59ca95d78341cd0c7a93a16cd824087debeb 1 parent 6408cbc
Maks3w authored
3  tests/Zend/Form/Element/FileTest.php
View
@@ -367,11 +367,12 @@ public function testMarkerInterfaceForFileElement()
public function testFileSize()
{
+ $expectedSize = sprintf("%.2fkB", 1.14);
$element = new FileElement('baz');
$adapter = new TestAsset\MockFileAdapter();
$element->setTransferAdapter($adapter);
- $this->assertEquals('1.14kB', $element->getFileSize('baz.text'));
+ $this->assertEquals($expectedSize, $element->getFileSize('baz.text'));
$adapter->setOptions(array('useByteString' => false));
$this->assertEquals(1172, $element->getFileSize('baz.text'));
}
6 tests/Zend/Form/Element/TestAsset/MockFileAdapter.php
View
@@ -2,16 +2,16 @@
namespace ZendTest\Form\Element\TestAsset;
-use Zend\File\Transfer\Adapter\AbstractAdapter;
+use Zend\File\Transfer\Adapter;
-class MockFileAdapter extends AbstractAdapter
+class MockFileAdapter extends Adapter\AbstractAdapter
{
public $received = false;
public function __construct()
{
$testfile = __DIR__ . '/../../../File/Transfer/Adapter/_files/test.txt';
- $this->_files = array(
+ $this->files = array(
'foo' => array(
'name' => 'foo.jpg',
'type' => 'image/jpeg',
Please sign in to comment.
Something went wrong with that request. Please try again.