File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
app/code/Magento/Reports/Test/Unit/Observer Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 20
20
use PHPUnit \Framework \TestCase ;
21
21
22
22
/**
23
- * Unit Test for @see CheckoutCartAddProductObserver
23
+ * Unit Test for \Magento\Reports\Observer\ CheckoutCartAddProductObserver
24
24
*/
25
25
class CheckoutCartAddProductObserverTest extends TestCase
26
26
{
@@ -84,7 +84,7 @@ protected function setUp()
84
84
/**
85
85
* The case when event has to be successfully saved
86
86
*/
87
- public function testExecute ()
87
+ public function testExecuteExpectsSaveCalledWhenNewProductAdded ()
88
88
{
89
89
$ this ->configureMocksWhenReportsEnabled ();
90
90
$ this ->quoteItemMock ->expects ($ this ->once ())
@@ -94,8 +94,7 @@ public function testExecute()
94
94
->method ('getParentItem ' )
95
95
->willReturn (null );
96
96
97
- $ this ->eventSaverMock ->expects ($ this ->once ())
98
- ->method ('save ' );
97
+ $ this ->eventSaverMock ->expects ($ this ->once ())->method ('save ' );
99
98
$ this ->observer ->execute ($ this ->eventObserverMock );
100
99
}
101
100
@@ -159,8 +158,7 @@ private function configureMocksWhenReportsEnabled()
159
158
*/
160
159
private function checkOriginalMethodIsNeverExecuted ()
161
160
{
162
- $ this ->eventSaverMock ->expects ($ this ->never ())
163
- ->method ('save ' );
161
+ $ this ->eventSaverMock ->expects ($ this ->never ())->method ('save ' );
164
162
$ this ->observer ->execute ($ this ->eventObserverMock );
165
163
}
166
164
}
You can’t perform that action at this time.
0 commit comments