public function testLoadByView() { $viewId = 'view_id'; $this->_resourceMock->expects($this->once())->method('load')->with($this->model, $viewId)->willReturnSelf(); $this->model->loadByView($viewId); $this->assertEquals($viewId, $this->model->getViewId()); }