public function testAbortingPersistence() { $vote = $this->getMock('FOS\\CommentBundle\\Model\\VoteInterface'); $event = new VotePersistEvent($vote); $this->assertFalse($event->isPersistenceAborted()); $event->abortPersistence(); $this->assertTrue($event->isPersistenceAborted()); }