File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
app/code/Magento/Indexer/Test/Unit/Console/Command Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -22,32 +22,17 @@ class IndexerResetStateCommandTest extends AbstractIndexerCommandCommonSetup
22
22
*/
23
23
private $ command ;
24
24
25
- protected function setUp (): void
26
- {
27
- parent ::setUp ();
28
- $ this ->stateMock ->expects ($ this ->once ())->method ('setAreaCode ' )->with (FrontNameResolver::AREA_CODE );
29
- }
30
-
31
- public function testExecute ()
25
+ public function testExecuter ()
32
26
{
33
27
$ this ->configureAdminArea ();
34
28
$ indexerOne = $ this ->getIndexerMock (
35
- ['getState ' ],
29
+ ['invalidate ' ],
36
30
['indexer_id ' => 'indexer_1 ' , 'title ' => 'Title_indexerOne ' ]
37
31
);
38
32
$ this ->initIndexerCollectionByItems ([$ indexerOne ]);
39
33
40
- $ stateMock = $ this ->createMock (State::class);
41
- $ stateMock ->expects ($ this ->exactly (1 ))
42
- ->method ('setStatus ' )
43
- ->with (StateInterface::STATUS_INVALID )->willReturnSelf ();
44
-
45
- $ stateMock ->expects ($ this ->exactly (1 ))
46
- ->method ('save ' );
47
-
48
34
$ indexerOne ->expects ($ this ->once ())
49
- ->method ('getState ' )
50
- ->willReturn ($ stateMock );
35
+ ->method ('invalidate ' );
51
36
52
37
$ this ->command = new IndexerResetStateCommand ($ this ->objectManagerFactory );
53
38
$ commandTester = new CommandTester ($ this ->command );
You can’t perform that action at this time.
0 commit comments