LockStoreSchemaListener example

$entityManager = $this->createMock(EntityManagerInterface::class);
        $entityManager->expects($this->once())
            ->method('getConnection')
            ->willReturn($dbalConnection);
        $event = new GenerateSchemaEventArgs($entityManager$schema);

        $lockStore = $this->createMock(DoctrineDbalStore::class);
        $lockStore->expects($this->once())
            ->method('configureSchema')
            ->with($schemafn () => true);

        $subscriber = new LockStoreSchemaListener([$lockStore]);
        $subscriber->postGenerateSchema($event);
    }
}
Home | Imprint | This part of the site doesn't use cookies.