Skip to content

Commit

Permalink
MNT Remove polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 4, 2021
1 parent 0143636 commit 7d0c735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"dms/phpunit-arraysubset-asserts": "^0.3.0",
"squizlabs/php_codesniffer": "^3",
"silverstripe/cms": "^4.5",
"silverstripe/campaign-admin": "^1.5"
Expand Down
16 changes: 4 additions & 12 deletions tests/php/Forms/UploadFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace SilverStripe\AssetAdmin\Tests\Forms;

use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use SilverStripe\AssetAdmin\Controller\AssetAdmin;
use SilverStripe\AssetAdmin\Forms\UploadField;
use SilverStripe\AssetAdmin\Tests\Forms\FileFormBuilderTest\FileOwner;
Expand All @@ -19,8 +18,6 @@
*/
class UploadFieldTest extends SapphireTest
{
use ArraySubsetAsserts;

protected static $fixture_file = 'FileFormBuilderTest.yml';

protected static $extra_dataobjects = [
Expand Down Expand Up @@ -105,15 +102,10 @@ public function testGetAttributes()
'files' => [ $admin->getMinimalistObjectFromData($image) ],
],
];
$this->assertArraySubset(
[
'class' => 'entwine-uploadfield uploadfield myfield',
'type' => 'file',
'multiple' => false,
'id' => 'Form_MyForm_MyField'
],
$attributes
);
$this->assertSame('entwine-uploadfield uploadfield myfield', $attributes['class']);
$this->assertSame('file', $attributes['type']);
$this->assertSame(false, $attributes['multiple']);
$this->assertSame('Form_MyForm_MyField', $attributes['id']);

// Check schema / state are encoded in this field
$this->assertEquals($schema, json_decode($attributes['data-schema'], true));
Expand Down

0 comments on commit 7d0c735

Please sign in to comment.