Skip to content

Commit 8087438

Browse files
committed
MAGETWO-46832: Downloadable webAPI tests tries to acces associative array via ID when keys have only natural identifiers - add fields
1 parent b196d8a commit 8087438

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/code/Magento/Downloadable/Model/LinkRepository.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Catalog\Api\Data\ProductInterface;
99
use Magento\Downloadable\Api\Data\LinkInterface;
10+
use Magento\Downloadable\Model\Product\Type;
1011
use Magento\Downloadable\Api\Data\File\ContentUploaderInterface;
1112
use Magento\Downloadable\Model\Product\TypeHandler\Link as LinkHandler;
1213
use Magento\Framework\EntityManager\MetadataPool;
@@ -42,6 +43,11 @@ class LinkRepository implements \Magento\Downloadable\Api\LinkRepositoryInterfac
4243
*/
4344
protected $contentValidator;
4445

46+
/**
47+
* @var Type
48+
*/
49+
protected $downloadableType;
50+
4551
/**
4652
* @var ContentUploaderInterface
4753
*/

app/code/Magento/Downloadable/Model/SampleRepository.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ class SampleRepository implements \Magento\Downloadable\Api\SampleRepositoryInte
4141
*/
4242
protected $downloadableType;
4343

44+
/**
45+
* @var SampleFactory
46+
*/
47+
protected $sampleFactory;
48+
4449
/**
4550
* @var SampleInterfaceFactory
4651
*/
@@ -90,7 +95,6 @@ public function __construct(
9095
$this->fileContentUploader = $fileContentUploader;
9196
$this->jsonEncoder = $jsonEncoder;
9297
$this->sampleFactory = $sampleFactory;
93-
$this->downloadableType = $downloadableType;
9498
$this->sampleDataObjectFactory = $sampleDataObjectFactory;
9599
}
96100

0 commit comments

Comments
 (0)