Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-cms
Test
Unit
Block
BlockTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Cms\Test\Unit\Block
;
7
8
class
BlockTest
extends
\PHPUnit\Framework\TestCase
9
{
13
protected
$block
;
14
15
protected
function
setUp
()
16
{
17
$objectManager
= new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
18
$this->block =
$objectManager
->getObject(\
Magento
\Cms\Block\Block::class);
19
}
20
21
protected
function
tearDown
()
22
{
23
$this->block =
null
;
24
}
25
26
public
function
testGetIdentities
()
27
{
28
$id
= 1;
29
$this->block->setBlockId(
$id
);
30
$this->assertEquals([\
Magento
\Cms\Model\Block::CACHE_TAG .
'_'
.
$id
], $this->block->getIdentities());
31
}
32
}
Magento\Cms\Test\Unit\Block
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Cms\Test\Unit\Block\BlockTest
Definition:
BlockTest.php:8
$id
$id
Definition:
fieldset.phtml:14
Magento\Cms\Test\Unit\Block\BlockTest\$block
$block
Definition:
BlockTest.php:13
Magento
Magento\Cms\Test\Unit\Block\BlockTest\setUp
setUp()
Definition:
BlockTest.php:15
Magento\Cms\Test\Unit\Block\BlockTest\testGetIdentities
testGetIdentities()
Definition:
BlockTest.php:26
Magento\Cms\Test\Unit\Block\BlockTest\tearDown
tearDown()
Definition:
BlockTest.php:21