public function testUpdate() { $em = $this->createEntityManagerMock(); $token = new Token(); $em->expects($this->once())->method('persist')->with($token); $em->expects($this->once())->method('flush'); $manipulator = new TokenManipulator($em, self::$DI['app']['random.low'], self::$DI['app']['repo.tokens'], self::$DI['app']['tmp.download.path']); $manipulator->update($token); }