File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
dev/tests/setup-integration/testsuite/Magento/Setup
setup/src/Magento/Setup/Model/Declaration/Schema/Declaration Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class DeclarativeSchemaBuilderTest extends SetupTestCase
38
38
public function setUp ()
39
39
{
40
40
$ objectManager = Bootstrap::getObjectManager ();
41
- $ this ->schemaConfig = $ objectManager ->create (SchemaConfig::class);
41
+ $ this ->schemaConfig = $ objectManager ->get (SchemaConfig::class);
42
42
$ this ->moduleManager = $ objectManager ->get (TestModuleManager::class);
43
43
$ this ->cliCommad = $ objectManager ->get (CliCommand::class);
44
44
}
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Setup \Model \Declaration \Schema \Declaration ;
8
8
9
+ use Magento \Framework \App \DeploymentConfig ;
9
10
use Magento \Framework \Config \ReaderInterface ;
10
11
11
12
/**
@@ -20,14 +21,21 @@ class ReaderComposite implements ReaderInterface
20
21
*/
21
22
private $ readers ;
22
23
24
+ /**
25
+ * @var DeploymentConfig
26
+ */
27
+ private $ deploymentConfig ;
28
+
23
29
/**
24
30
* Constructor.
25
31
*
32
+ * @param DeploymentConfig $deploymentConfig
26
33
* @param ReaderInterface[] $readers
27
34
*/
28
- public function __construct (array $ readers = [])
35
+ public function __construct (DeploymentConfig $ deploymentConfig , array $ readers = [])
29
36
{
30
37
$ this ->readers = $ readers ;
38
+ $ this ->deploymentConfig = $ deploymentConfig ;
31
39
}
32
40
33
41
/**
@@ -39,7 +47,12 @@ public function read($scope = null)
39
47
foreach ($ this ->readers as $ reader ) {
40
48
$ schema = array_replace_recursive ($ schema , $ reader ->read ($ scope ));
41
49
}
42
- var_dump ($ schema );
50
+
51
+ if (!count ($ schema )) {
52
+ var_dump ($ this ->deploymentConfig ->get ());
53
+ var_dump ($ this ->deploymentConfig ->getConfigData ());
54
+ }
55
+
43
56
return $ schema ;
44
57
}
45
58
}
You can’t perform that action at this time.
0 commit comments