File tree 1 file changed +7
-2
lines changed
app/code/Magento/Checkout/Test/Unit/Controller/Cart
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ class AddTest extends \PHPUnit\Framework\TestCase
34
34
*/
35
35
private $ messageManager ;
36
36
37
+ /**
38
+ * @var \Magento\Checkout\Controller\Cart\Add | \PHPUnit_Framework_MockObject_MockObject
39
+ */
40
+ private $ cartAdd ;
41
+
37
42
/**
38
43
* Init mocks for tests.
39
44
*
@@ -52,7 +57,7 @@ public function setUp()
52
57
->disableOriginalConstructor ()->getMock ();
53
58
54
59
$ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
55
- $ this ->add = $ this ->objectManagerHelper ->getObject (
60
+ $ this ->cartAdd = $ this ->objectManagerHelper ->getObject (
56
61
\Magento \Checkout \Controller \Cart \Add::class,
57
62
[
58
63
'_formKeyValidator ' => $ this ->formKeyValidator ,
@@ -79,6 +84,6 @@ public function testExecute()
79
84
$ this ->messageManager ->expects ($ this ->once ())->method ('addErrorMessage ' );
80
85
$ this ->resultRedirectFactory ->expects ($ this ->once ())->method ('create ' )->willReturn ($ redirect );
81
86
$ redirect ->expects ($ this ->once ())->method ('setPath ' )->with ($ path )->willReturnSelf ();
82
- $ this ->assertEquals ($ redirect , $ this ->add ->execute ());
87
+ $ this ->assertEquals ($ redirect , $ this ->cartAdd ->execute ());
83
88
}
84
89
}
You can’t perform that action at this time.
0 commit comments