Migration1692277552FixCustomerReviewCount example

private IdsCollection $ids;

    protected function setUp(): void
    {
        $this->ids = new TestDataCollection();
        $this->connection = KernelLifecycleManager::getConnection();
    }

    public function testUpdate(): void
    {
        $migration = new Migration1692277552FixCustomerReviewCount();

        $this->createCustomer();
        $this->createProduct();
        $this->createReview($this->ids->create('review1'), true);
        $this->createReview($this->ids->create('review2'), false);
        $this->createReview($this->ids->create('review3'), true);

        $migration->update($this->connection);
        $migration->update($this->connection);

        $reviewCount = $this->connection->fetchOne(
            
Home | Imprint | This part of the site doesn't use cookies.