CmsPageConfigReaderTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sitemap\Model\ItemProvider;
  7. use Magento\Store\Model\Store;
  8. use Magento\TestFramework\Helper\Bootstrap;
  9. class CmsPageConfigReaderTest extends \PHPUnit\Framework\TestCase
  10. {
  11. /**
  12. * @var CategoryConfigReader
  13. */
  14. private $model = null;
  15. protected function setUp()
  16. {
  17. $this->model = Bootstrap::getObjectManager()->get(CmsPageConfigReader::class);
  18. }
  19. /**
  20. * @magentoConfigFixture default_store sitemap/page/changefreq monthly
  21. */
  22. public function testGetChangeFrequency()
  23. {
  24. $this->assertEquals('daily', $this->model->getChangeFrequency(Store::DEFAULT_STORE_ID));
  25. $this->assertEquals('monthly', $this->model->getChangeFrequency(Store::DISTRO_STORE_ID));
  26. }
  27. /**
  28. * @magentoConfigFixture default_store sitemap/page/priority 100
  29. */
  30. public function testGetCategoryPriority()
  31. {
  32. $this->assertEquals(0.25, $this->model->getPriority(Store::DEFAULT_STORE_ID));
  33. $this->assertEquals(100, $this->model->getPriority(Store::DISTRO_STORE_ID));
  34. }
  35. }