Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StartTest.php
Go to the documentation of this file.
1 <?php
8 
10 {
11  protected $name = 'Start';
12 
17  public function testStartAction($buttonParam)
18  {
19  $this->request->expects($this->at(1))
20  ->method('getParam')
21  ->with('bml')
22  ->will($this->returnValue($buttonParam));
23  $this->checkout->expects($this->once())
24  ->method('setIsBml')
25  ->with((bool)$buttonParam);
26 
27  $this->request->expects($this->at(2))
28  ->method('getParam')
29  ->with(\Magento\Paypal\Model\Express\Checkout::PAYMENT_INFO_BUTTON)
30  ->will($this->returnValue($buttonParam));
31  $this->customerData->expects($this->any())
32  ->method('getId')
33  ->will($this->returnValue(1));
34  $this->checkout->expects($this->once())
35  ->method('start')
36  ->with($this->anything(), $this->anything(), (bool)$buttonParam);
37  $this->model->execute();
38  }
39 
43  public function startActionDataProvider()
44  {
45  return [['1'], [null]];
46  }
47 }