1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
declare(strict_types=1);
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Ui\Test\Unit\Component\Form;
use Magento\Ui\Component\Form\Fieldset;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
/**
* Class FieldTest
*
* Test for class \Magento\Ui\Component\Form\Fieldset
*/
class FieldsetTest extends \PHPUnit\Framework\TestCase
{
const NAME = 'fieldset';
/**
* @var Fieldset
*/
protected $fieldset;
/**
* @var ContextInterface|\PHPUnit_Framework_MockObject_MockObject
*/
private $context;
/**
* Set up
*
* @return void
*/
protected function setUp()
{
$this->context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class)
->getMockForAbstractClass();
$this->fieldset = new Fieldset(
$this->context,
[],
[]
);
}
/**
* Run test for getComponentName() method
*
* @return void
*
*/
public function testGetComponentName()
{
$this->assertEquals(self::NAME, $this->fieldset->getComponentName());
}
}