Issues (3641)

DeleteOrphanPriceProductStoreEntitiesTest.php (1 issue)

1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerTest\Zed\PriceProduct\Business\Facade;
9
10
use Codeception\Test\Unit;
11
use Spryker\Zed\PriceProduct\Business\PriceProductBusinessFactory;
12
use Spryker\Zed\PriceProduct\Persistence\PriceProductEntityManager;
13
use SprykerTest\Zed\PriceProduct\PriceProductBusinessTester;
14
15
/**
16
 * Auto-generated group annotations
17
 *
18
 * @group SprykerTest
19
 * @group Zed
20
 * @group PriceProduct
21
 * @group Business
22
 * @group Facade
23
 * @group DeleteOrphanPriceProductStoreEntitiesTest
24
 * Add your own group annotations below this line
25
 */
26
class DeleteOrphanPriceProductStoreEntitiesTest extends Unit
27
{
28
    /**
29
     * @var \SprykerTest\Zed\PriceProduct\PriceProductBusinessTester
30
     */
31
    protected PriceProductBusinessTester $tester;
32
33
    /**
34
     * @return void
35
     */
36
    public function testDeleteOrphanPriceProductStoreEntitiesNotFails(): void
37
    {
38
        // Arrange
39
        $priceProductFacade = $this->tester->getFacade();
40
        $priceProductBusinessFactory = (new PriceProductBusinessFactory());
41
42
        /** @var \Spryker\Zed\PriceProduct\Persistence\PriceProductEntityManager $priceProductEntityManagerMock */
43
        $priceProductEntityManagerMock = $this->getMockBuilder(PriceProductEntityManager::class)
44
            ->setMethods([
45
                'deletePriceProductStore',
46
            ])
47
            ->getMock();
48
49
        $priceProductBusinessFactory->setEntityManager($priceProductEntityManagerMock);
50
        $priceProductFacade->setFactory($priceProductBusinessFactory);
0 ignored issues
show
The method setFactory() does not exist on Spryker\Zed\PriceProduct...eProductFacadeInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to Spryker\Zed\PriceProduct...eProductFacadeInterface. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

50
        $priceProductFacade->/** @scrutinizer ignore-call */ 
51
                             setFactory($priceProductBusinessFactory);
Loading history...
51
52
        // Act
53
        $priceProductFacade->deleteOrphanPriceProductStoreEntities();
54
    }
55
}
56