File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ class ShipmentSenderTest extends \PHPUnit\Framework\TestCase
30
30
/** @var ObjectManagerInterface */
31
31
private $ objectManager ;
32
32
33
+ /** @var State */
34
+ private $ state ;
35
+
33
36
/** @var Logger */
34
37
private $ logger ;
35
38
@@ -52,9 +55,9 @@ protected function setUp(): void
52
55
parent ::setUp ();
53
56
54
57
$ this ->objectManager = Bootstrap::getObjectManager ();
55
- $ stateObject = $ this ->objectManager ->get (\Magento \Framework \App \State::class);
56
- $ this ->defaultMode = $ stateObject ->getMode ();
57
- $ stateObject ->setMode (State::MODE_DEFAULT );
58
+ $ this -> state = $ this ->objectManager ->get (\Magento \Framework \App \State::class);
59
+ $ this ->defaultMode = $ this -> state ->getMode ();
60
+ $ this -> state ->setMode (State::MODE_DEFAULT );
58
61
$ this ->logger = $ this ->objectManager ->get (Logger::class);
59
62
$ reflection = new \ReflectionClass (get_class ($ this ->logger ));
60
63
$ reflectionProperty = $ reflection ->getProperty ('minimumErrorLevel ' );
@@ -234,7 +237,6 @@ protected function tearDown(): void
234
237
$ reflectionProperty ->setAccessible (true );
235
238
$ reflectionProperty ->setValue ($ this ->logger , $ this ->minErrorDefaultValue );
236
239
237
- $ stateObject = $ this ->objectManager ->get (\Magento \Framework \App \State::class);
238
- $ stateObject ->setMode ($ this ->defaultMode );
240
+ $ this ->state ->setMode ($ this ->defaultMode );
239
241
}
240
242
}
You can’t perform that action at this time.
0 commit comments