BlockTest.php 795 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Cms\Test\Unit\Block;
  7. class BlockTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @var \Magento\Cms\Block\Block
  11. */
  12. protected $block;
  13. protected function setUp()
  14. {
  15. $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
  16. $this->block = $objectManager->getObject(\Magento\Cms\Block\Block::class);
  17. }
  18. protected function tearDown()
  19. {
  20. $this->block = null;
  21. }
  22. public function testGetIdentities()
  23. {
  24. $id = 1;
  25. $this->block->setBlockId($id);
  26. $this->assertEquals([\Magento\Cms\Model\Block::CACHE_TAG . '_' . $id], $this->block->getIdentities());
  27. }
  28. }