public function testClearUserRoles() { $uid = 123; $this->userMock->expects($this->once())->method('getId')->willReturn($uid); $this->resourceMock->expects($this->once())->method('getConnection')->willReturn($this->dbAdapterMock); $this->dbAdapterMock->expects($this->once())->method('delete'); $this->model->_clearUserRoles($this->userMock); }