Example #1
0
 public function testExecuteWithoutData()
 {
     $this->jsonFactory->expects($this->once())->method('create')->willReturn($this->resultJson);
     $this->request->expects($this->any())->method('getParam')->willReturnMap([['items', [], []], ['isAjax', null, true]]);
     $this->resultJson->expects($this->once())->method('setData')->with(['messages' => ['Please correct the data sent.'], 'error' => true])->willReturnSelf();
     $this->assertSame($this->resultJson, $this->controller->execute());
 }