File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
integration/testsuite/Magento/Framework/View/Layout/Reader
unit/testsuite/Magento/Framework/Module/Declaration/Converter
lib/internal/Magento/Framework/Webapi Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ public function setUp()
43
43
public function testInterpretBlockDirective ()
44
44
{
45
45
$ pageXml = new \Magento \Framework \View \Layout \Element (
46
- __DIR__ . '/_files/_layout_update_block.xml ' , 0 , true
46
+ __DIR__ . '/_files/_layout_update_block.xml ' ,
47
+ 0 ,
48
+ true
47
49
);
48
50
$ parentElement = new \Magento \Framework \View \Layout \Element ('<page></page> ' );
49
51
@@ -74,7 +76,9 @@ public function testInterpretBlockDirective()
74
76
public function testInterpretReferenceBlockDirective ()
75
77
{
76
78
$ pageXml = new \Magento \Framework \View \Layout \Element (
77
- __DIR__ . '/_files/_layout_update_reference.xml ' , 0 , true
79
+ __DIR__ . '/_files/_layout_update_reference.xml ' ,
80
+ 0 ,
81
+ true
78
82
);
79
83
$ parentElement = new \Magento \Framework \View \Layout \Element ('<page></page> ' );
80
84
Original file line number Diff line number Diff line change @@ -34,16 +34,20 @@ public function testConvertWithValidDom()
34
34
public function testConvertWithInvalidDom ($ xmlString )
35
35
{
36
36
$ dom = new \DOMDocument ();
37
- $ dom ->loadXML ($ xmlString );
38
- $ this ->_converter ->convert ($ dom );
37
+ try {
38
+ $ dom ->loadXML ($ xmlString );
39
+ $ this ->_converter ->convert ($ dom );
40
+ } catch (\PHPUnit_Framework_Error $ ex ) {
41
+ // do nothing because we expect \Exception but not \PHPUnit_Framework_Error
42
+ }
39
43
}
40
44
41
45
public function convertWithInvalidDomDataProvider ()
42
46
{
43
47
return [
44
48
'Module node without "name" attribute ' => ['<?xml version="1.0"?><config><module /></config> ' ],
45
49
'Sequence module node without "name" attribute ' => [
46
- '<?xml dbversion ="1.0"?><config><module name="Module_One" setup_version="1.0.0.0"> ' .
50
+ '<?xml version ="1.0"?><config><module name="Module_One" setup_version="1.0.0.0"> ' .
47
51
'<sequence><module/></sequence></module></config> ' ,
48
52
],
49
53
];
Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ public function __construct(
45
45
*
46
46
* Added CGI environment support.
47
47
*/
48
- public function getHeader ($ header )
48
+ public function getHeader ($ header, $ default = false )
49
49
{
50
- $ headerValue = parent ::getHeader ($ header );
50
+ $ headerValue = parent ::getHeader ($ header, $ default );
51
51
if ($ headerValue == false ) {
52
52
/** Workaround for hhvm environment */
53
53
$ header = 'REDIRECT_HTTP_ ' . strtoupper (str_replace ('- ' , '_ ' , $ header ));
You can’t perform that action at this time.
0 commit comments