Skip to content

Commit

Permalink
Add integration test for bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
schmengler committed May 8, 2020
1 parent 87c5c60 commit 31c5963
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,35 @@
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;

/**
* Class CategoryUrlRewriteGeneratorTest
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CategoryUrlRewriteGeneratorTest extends \PHPUnit\Framework\TestCase
{
/** @var \PHPUnit_Framework_MockObject_MockObject */
/** @var \PHPUnit\Framework\MockObject\MockObject */
private $canonicalUrlRewriteGenerator;

/** @var \PHPUnit_Framework_MockObject_MockObject */
/** @var \PHPUnit\Framework\MockObject\MockObject */
private $currentUrlRewritesRegenerator;

/** @var \PHPUnit_Framework_MockObject_MockObject */
/** @var \PHPUnit\Framework\MockObject\MockObject */
private $childrenUrlRewriteGenerator;

/** @var \Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator */
private $categoryUrlRewriteGenerator;

/** @var \Magento\CatalogUrlRewrite\Service\V1\StoreViewService|\PHPUnit_Framework_MockObject_MockObject */
/** @var \Magento\CatalogUrlRewrite\Service\V1\StoreViewService|\PHPUnit\Framework\MockObject\MockObject */
private $storeViewService;

/** @var \Magento\Catalog\Model\Category|\PHPUnit_Framework_MockObject_MockObject */
/** @var \Magento\Catalog\Model\Category|\PHPUnit\Framework\MockObject\MockObject */
private $category;

/** @var \Magento\Catalog\Api\CategoryRepositoryInterface|\PHPUnit_Framework_MockObject_MockObject */
/** @var \Magento\Catalog\Api\CategoryRepositoryInterface|\PHPUnit\Framework\MockObject\MockObject */
private $categoryRepository;

/** @var \PHPUnit_Framework_MockObject_MockObject */
/** @var \PHPUnit\Framework\MockObject\MockObject */
private $mergeDataProvider;

/** @var \Magento\Framework\Serialize\Serializer\Json|\PHPUnit_Framework_MockObject_MockObject */
/** @var \Magento\Framework\Serialize\Serializer\Json|\PHPUnit\Framework\MockObject\MockObject */
protected $serializer;

/**
Expand Down Expand Up @@ -141,6 +139,7 @@ public function testGenerationForGlobalScope()
],
$this->categoryUrlRewriteGenerator->generate($this->category, false, $categoryId)
);
$this->assertEquals(0, $this->category->getStoreId(), 'Store ID should not have been modified');
}

/**
Expand Down

0 comments on commit 31c5963

Please sign in to comment.