Esempio n. 1
0
 public function testDeleteSucess()
 {
     $uid = 123;
     $this->resourceMock->expects($this->once())->method('getConnection')->willReturn($this->dbAdapterMock);
     $this->dbAdapterMock->expects($this->once())->method('beginTransaction');
     $this->userMock->expects($this->once())->method('getId')->willReturn($uid);
     $this->dbAdapterMock->expects($this->atLeastOnce())->method('delete');
     $this->assertTrue($this->model->delete($this->userMock));
 }