runs4806b67a1eff › Bundle/Model/ResourceModel

Bundle/Model/ResourceModel 20 tests · 6 failing · 0 skipped · 03:11

testsecondshistory
Magento.Bundle.Model.ResourceModel.Indexer.PriceTest::testBundleDynamicPriceWhenShowOutOfStockIsDisabled
details

deterministic 10.823s

Magento\Bundle\Model\ResourceModel\Indexer\PriceTest::testBundleDynamicPriceWhenShowOutOfStockIsDisabled
TypeError: array_intersect_key(): Argument #2 must be of type array, null given

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/PriceTest.php:157
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/PriceTest.php:84
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/PriceTest.php:80–104
<?php
        DataFixture(BundleProductFixture::class, ['_options' => ['$opt2_1$', '$opt2_2$']], 'bundle2'),
    ]
    public function testBundleDynamicPriceWhenShowOutOfStockIsDisabled(): void
    {
        $this->assertPriceData([
            // bundle1: required option1 (product1) + required option2 (product2, product3)
            // bundle1 is in stock: product3 is out of stock, but product2 is in stock in option2
            // expected: the price range includes only available selections
            'bundle1' => [
                'min_price' => 13,
                'max_price' => 13
            ],
            // bundle2: required option1 (product1) + required option2 (product3, product4)
            // bundle2 is out of stock: both product3 and product4 are out of stock
            // expected: no price data
            'bundle2' => null
        ]);
    }

    #[
        DbIsolation(false),
        Config('cataloginventory/options/show_out_of_stock', 1, 'store'),
        DataFixture(ProductFixture::class, ['price' => 10], 'product1'),
        DataFixture(ProductFixture::class, ['price' => 3], 'product2'),
        DataFixture(ProductFixture::class, ['price' => 5, 'stock_item' => ['qty' => 0]], 'product3'),
10.82
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #0
details

deterministic 3.548s

Magento\Bundle\Model\ResourceModel\Indexer\StockTest::testReindexRow with data set #0
Failed asserting that false matches expected true.

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:142
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:127–151
<?php
     */
    #[DataProvider('reindexRowDataProvider')]
    public function testReindexRow(array $stockItems, bool $expectedStockStatus): void
    {
        $productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
        foreach ($stockItems as $sku => $stockItem) {
            $child = $productRepository->get($sku);
            $child->setStockData($stockItem);
            $productRepository->save($child);
        }
        $bundle = $productRepository->get('bundle1');
        $this->processor->reindexRow($bundle->getId());

        $stockStatusResource = Bootstrap::getObjectManager()->get(StockStatusResource::class);
        $stockStatus = $stockStatusResource->getProductsStockStatuses($bundle->getId(), 0);
        self::assertEquals($expectedStockStatus, (bool) $stockStatus[$bundle->getId()]);
    }

    public static function reindexRowDataProvider(): array
    {
        return [
            [
                [
                    'simple1' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
                    'simple2' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
3.55
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #1
details

deterministic 3.286s

Magento\Bundle\Model\ResourceModel\Indexer\StockTest::testReindexRow with data set #1
Failed asserting that false matches expected true.

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:142
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:127–151
<?php
     */
    #[DataProvider('reindexRowDataProvider')]
    public function testReindexRow(array $stockItems, bool $expectedStockStatus): void
    {
        $productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
        foreach ($stockItems as $sku => $stockItem) {
            $child = $productRepository->get($sku);
            $child->setStockData($stockItem);
            $productRepository->save($child);
        }
        $bundle = $productRepository->get('bundle1');
        $this->processor->reindexRow($bundle->getId());

        $stockStatusResource = Bootstrap::getObjectManager()->get(StockStatusResource::class);
        $stockStatus = $stockStatusResource->getProductsStockStatuses($bundle->getId(), 0);
        self::assertEquals($expectedStockStatus, (bool) $stockStatus[$bundle->getId()]);
    }

    public static function reindexRowDataProvider(): array
    {
        return [
            [
                [
                    'simple1' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
                    'simple2' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
3.29
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #4
details

deterministic 1.237s

Magento\Bundle\Model\ResourceModel\Indexer\StockTest::testReindexRow with data set #4
Failed asserting that false matches expected true.

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:142
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:127–151
<?php
     */
    #[DataProvider('reindexRowDataProvider')]
    public function testReindexRow(array $stockItems, bool $expectedStockStatus): void
    {
        $productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
        foreach ($stockItems as $sku => $stockItem) {
            $child = $productRepository->get($sku);
            $child->setStockData($stockItem);
            $productRepository->save($child);
        }
        $bundle = $productRepository->get('bundle1');
        $this->processor->reindexRow($bundle->getId());

        $stockStatusResource = Bootstrap::getObjectManager()->get(StockStatusResource::class);
        $stockStatus = $stockStatusResource->getProductsStockStatuses($bundle->getId(), 0);
        self::assertEquals($expectedStockStatus, (bool) $stockStatus[$bundle->getId()]);
    }

    public static function reindexRowDataProvider(): array
    {
        return [
            [
                [
                    'simple1' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
                    'simple2' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
1.24
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #5
details

deterministic 1.964s

Magento\Bundle\Model\ResourceModel\Indexer\StockTest::testReindexRow with data set #5
Failed asserting that false matches expected true.

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:142
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:127–151
<?php
     */
    #[DataProvider('reindexRowDataProvider')]
    public function testReindexRow(array $stockItems, bool $expectedStockStatus): void
    {
        $productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
        foreach ($stockItems as $sku => $stockItem) {
            $child = $productRepository->get($sku);
            $child->setStockData($stockItem);
            $productRepository->save($child);
        }
        $bundle = $productRepository->get('bundle1');
        $this->processor->reindexRow($bundle->getId());

        $stockStatusResource = Bootstrap::getObjectManager()->get(StockStatusResource::class);
        $stockStatus = $stockStatusResource->getProductsStockStatuses($bundle->getId(), 0);
        self::assertEquals($expectedStockStatus, (bool) $stockStatus[$bundle->getId()]);
    }

    public static function reindexRowDataProvider(): array
    {
        return [
            [
                [
                    'simple1' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
                    'simple2' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
1.96
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #6
details

deterministic 2.46s

Magento\Bundle\Model\ResourceModel\Indexer\StockTest::testReindexRow with data set #6
Failed asserting that false matches expected true.

/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:142
/srv/mageos-testing/mageos-master/dev/tests/integration/testsuite/Magento/Bundle/Model/ResourceModel/Indexer/StockTest.php:127–151
<?php
     */
    #[DataProvider('reindexRowDataProvider')]
    public function testReindexRow(array $stockItems, bool $expectedStockStatus): void
    {
        $productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
        foreach ($stockItems as $sku => $stockItem) {
            $child = $productRepository->get($sku);
            $child->setStockData($stockItem);
            $productRepository->save($child);
        }
        $bundle = $productRepository->get('bundle1');
        $this->processor->reindexRow($bundle->getId());

        $stockStatusResource = Bootstrap::getObjectManager()->get(StockStatusResource::class);
        $stockStatus = $stockStatusResource->getProductsStockStatuses($bundle->getId(), 0);
        self::assertEquals($expectedStockStatus, (bool) $stockStatus[$bundle->getId()]);
    }

    public static function reindexRowDataProvider(): array
    {
        return [
            [
                [
                    'simple1' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
                    'simple2' => ['manage_stock' => true, 'backorders' => false, 'qty' => 2],
2.46
Magento.Bundle.Model.ResourceModel.Indexer.PriceTest::testBundleDynamicPriceWhenShowOutOfStockIsEnabled6.97
Magento.Bundle.Model.ResourceModel.Indexer.PriceTest::testExecuteForBundleWithoutWebsites0.38
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexAll11.74
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #22.31
Magento.Bundle.Model.ResourceModel.Indexer.StockTest::testReindexRow with data set #31.50
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #013.09
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #114.25
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #215.56
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #315.40
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #420.54
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #521.80
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #620.31
Magento.Bundle.Model.ResourceModel.Option.AreBundleOptionsSalableTest::testExecute with data set #719.44
Magento.Bundle.Model.ResourceModel.Selection.CollectionTest::testAddPriceDataWithIndexerDimensionMode with data set "Dynamic bundle product with three Simple products"4.43