public function testAggregateSalesReportCouponsData() { $data = new \DateTime(); $this->localeResolver->expects($this->once())->method('emulate')->with(0); $this->localeDate->expects($this->once())->method('date')->will($this->returnValue($data)); $this->reportRule->expects($this->once())->method('aggregate')->with($data); $this->localeResolver->expects($this->once())->method('revert'); $this->assertEquals($this->model, $this->model->aggregateSalesReportCouponsData()); }
public function testAggregateSalesReportCouponsData() { $dateMock = $this->getMock('Magento\\Framework\\Stdlib\\DateTime\\DateInterface', [], [], '', false); $this->localeResolver->expects($this->once())->method('emulate')->with(0); $this->localeDate->expects($this->once())->method('date')->will($this->returnValue($dateMock)); $dateMock->expects($this->once())->method('subHour')->with(25)->will($this->returnSelf()); $this->reportRule->expects($this->once())->method('aggregate')->with($dateMock); $this->localeResolver->expects($this->once())->method('revert'); $this->assertEquals($this->model, $this->model->aggregateSalesReportCouponsData()); }