File tree Expand file tree Collapse file tree 3 files changed +30
-15
lines changed
app/code/Magento/NewRelicReporting
dev/tests/integration/testsuite/Magento/NewRelicReporting/Model/Module Expand file tree Collapse file tree 3 files changed +30
-15
lines changed Original file line number Diff line number Diff line change @@ -277,9 +277,7 @@ public function getModuleData($refresh = true)
277
277
$ changes = array_diff ($ module , $ changeTest );
278
278
$ changesCleanArray = $ this ->getCleanChangesArray ($ changes );
279
279
280
- if (count ($ changesCleanArray ) > 0 ||
281
- ($ this ->moduleManager ->isOutputEnabled ($ changeTest ['name ' ]) &&
282
- $ module ['setup_version ' ] != null )) {
280
+ if (!empty ($ changesCleanArray )) {
283
281
$ data = [
284
282
'entity_id ' => $ changeTest ['entity_id ' ],
285
283
'name ' => $ changeTest ['name ' ],
Original file line number Diff line number Diff line change @@ -162,10 +162,6 @@ public function testGetModuleDataWithoutRefresh()
162
162
->method ('getNames ' )
163
163
->willReturn ($ enabledModulesMockArray );
164
164
165
- $ this ->moduleManagerMock ->expects ($ this ->any ())->method ('isOutputEnabled ' )->will (
166
- $ this ->returnValue (false )
167
- );
168
-
169
165
$ this ->assertInternalType (
170
166
'array ' ,
171
167
$ this ->model ->getModuleData ()
@@ -256,10 +252,6 @@ public function testGetModuleDataRefresh($data)
256
252
->method ('getNames ' )
257
253
->willReturn ($ enabledModulesMockArray );
258
254
259
- $ this ->moduleManagerMock ->expects ($ this ->any ())->method ('isOutputEnabled ' )->will (
260
- $ this ->returnValue (true )
261
- );
262
-
263
255
$ this ->assertInternalType (
264
256
'array ' ,
265
257
$ this ->model ->getModuleData ()
@@ -350,10 +342,6 @@ public function testGetModuleDataRefreshOrStatement($data)
350
342
->method ('getNames ' )
351
343
->willReturn ($ enabledModulesMockArray );
352
344
353
- $ this ->moduleManagerMock ->expects ($ this ->any ())->method ('isOutputEnabled ' )->will (
354
- $ this ->returnValue (true )
355
- );
356
-
357
345
$ this ->assertInternalType (
358
346
'array ' ,
359
347
$ this ->model ->getModuleData ()
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \NewRelicReporting \Model \Module ;
7
+
8
+ use Magento \TestFramework \Helper \Bootstrap ;
9
+ use PHPUnit \Framework \TestCase ;
10
+
11
+ class CollectTest extends TestCase
12
+ {
13
+ /**
14
+ * @var Collect
15
+ */
16
+ private $ collect ;
17
+
18
+ protected function setUp ()
19
+ {
20
+ $ this ->collect = Bootstrap::getObjectManager ()->create (Collect::class);
21
+ }
22
+
23
+ public function testReport ()
24
+ {
25
+ $ this ->collect ->getModuleData ();
26
+ $ moduleData = $ this ->collect ->getModuleData ();
27
+ $ this ->assertEmpty ($ moduleData ['changes ' ]);
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments