/** * @dataProvider getExistingUser */ public function testPersistExisting(User $user) { $this->dbal->expects($this->once())->method('update'); $this->mapper->save($user); }