Scheb\TwoFactorBundle\Tests\Model\DoctrinePersisterTest::persist_persistObject_callPersistAndFlush PHP Method

persist_persistObject_callPersistAndFlush() public method

    public function persist_persistObject_callPersistAndFlush()
    {
        $user = new \stdClass();
        //Some user object
        //Mock the EntityManager
        $this->em->expects($this->once())->method('persist')->with($user);
        $this->em->expects($this->once())->method('flush');
        $this->persister->persist($user);
    }