コード例 #1
0
 /**
  * Creates mock for comments collection factory
  * @return void
  */
 private function initCommentsCollectionFactoryMock()
 {
     $this->commentCollection = $this->getMockBuilder(Collection::class)->disableOriginalConstructor()->setMethods(['setShipmentFilter', 'setCreatedAtOrder', 'getItems', 'load', '__wakeup'])->getMock();
     $this->commentCollectionFactory = $this->getMockBuilder(CollectionFactory::class)->disableOriginalConstructor()->setMethods(['create'])->getMock();
     $this->commentCollectionFactory->expects(static::any())->method('create')->willReturn($this->commentCollection);
 }