File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed
app/code/Magento/MediaGalleryRenditions Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 10
10
11
11
use Magento \Framework \App \Config \Initial ;
12
12
use Magento \Framework \App \Config \ScopeConfigInterface ;
13
- use Magento \Framework \App \ResourceConnection ;
14
- use Magento \Framework \Exception \NoSuchEntityException ;
15
13
16
14
/**
17
15
* Class responsible for providing access to Media Gallery Renditions system configuration.
18
16
*/
19
17
class Config
20
18
{
21
- private const TABLE_CORE_CONFIG_DATA = 'core_config_data ' ;
22
19
private const XML_PATH_MEDIA_GALLERY_ENABLED = 'system/media_gallery/enabled ' ;
23
20
private const XML_PATH_ENABLED = 'system/media_gallery_renditions/enabled ' ;
24
21
private const XML_PATH_MEDIA_GALLERY_RENDITIONS_WIDTH_PATH = 'system/media_gallery_renditions/width ' ;
@@ -34,24 +31,16 @@ class Config
34
31
*/
35
32
private $ initialConfig ;
36
33
37
- /**
38
- * @var ResourceConnection
39
- */
40
- private $ resourceConnection ;
41
-
42
34
/**
43
35
* @param ScopeConfigInterface $scopeConfig
44
36
* @param Initial $initialConfig
45
- * @param ResourceConnection $resourceConnection
46
37
*/
47
38
public function __construct (
48
39
ScopeConfigInterface $ scopeConfig ,
49
- Initial $ initialConfig ,
50
- ResourceConnection $ resourceConnection
40
+ Initial $ initialConfig
51
41
) {
52
42
$ this ->scopeConfig = $ scopeConfig ;
53
43
$ this ->initialConfig = $ initialConfig ;
54
- $ this ->resourceConnection = $ resourceConnection ;
55
44
}
56
45
57
46
/**
Original file line number Diff line number Diff line change 9
9
10
10
use Magento \Framework \App \Config \Initial ;
11
11
use Magento \Framework \App \Config \ScopeConfigInterface ;
12
- use Magento \Framework \App \ResourceConnection ;
13
12
use Magento \MediaGalleryRenditions \Model \Config ;
14
13
use PHPUnit \Framework \MockObject \MockObject ;
15
14
use PHPUnit \Framework \TestCase ;
@@ -26,11 +25,6 @@ class ConfigTest extends TestCase
26
25
*/
27
26
private $ initialConfigMock ;
28
27
29
- /**
30
- * @var ResourceConnection|MockObject
31
- */
32
- private $ resourceConnectionMock ;
33
-
34
28
/**
35
29
* @var Config
36
30
*/
@@ -40,11 +34,9 @@ protected function setUp(): void
40
34
{
41
35
$ this ->scopeConfigMock = $ this ->createMock (ScopeConfigInterface::class);
42
36
$ this ->initialConfigMock = $ this ->createMock (Initial::class);
43
- $ this ->resourceConnectionMock = $ this ->createMock (ResourceConnection::class);
44
37
$ this ->config = new Config (
45
38
$ this ->scopeConfigMock ,
46
- $ this ->initialConfigMock ,
47
- $ this ->resourceConnectionMock
39
+ $ this ->initialConfigMock
48
40
);
49
41
}
50
42
You can’t perform that action at this time.
0 commit comments