Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
TabTest Class Reference
Inheritance diagram for TabTest:

Public Member Functions

 testIsVisibleOnlyChecksPresenceOfChildren ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

 $_model
 
 $_iteratorMock
 

Detailed Description

Definition at line 10 of file TabTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 22 of file TabTest.php.

23  {
24  $this->_iteratorMock = $this->createMock(\Magento\Config\Model\Config\Structure\Element\Iterator\Field::class);
25 
26  $this->_model = (new ObjectManager($this))->getObject(
27  \Magento\Config\Model\Config\Structure\Element\Tab::class,
28  ['childrenIterator' => $this->_iteratorMock]
29  );
30  }

◆ tearDown()

tearDown ( )
protected

Definition at line 32 of file TabTest.php.

33  {
34  unset($this->_model);
35  unset($this->_iteratorMock);
36  }

◆ testIsVisibleOnlyChecksPresenceOfChildren()

testIsVisibleOnlyChecksPresenceOfChildren ( )

Definition at line 38 of file TabTest.php.

39  {
40  $this->_model->setData(['showInStore' => 0, 'showInWebsite' => 0, 'showInDefault' => 0], 'store');
41  $this->_iteratorMock->expects($this->once())->method('current')->will($this->returnValue(true));
42  $this->_iteratorMock->expects($this->once())->method('valid')->will($this->returnValue(true));
43  $this->assertTrue($this->_model->isVisible());
44  }

Field Documentation

◆ $_iteratorMock

$_iteratorMock
protected

Definition at line 20 of file TabTest.php.

◆ $_model

$_model
protected

Definition at line 15 of file TabTest.php.


The documentation for this class was generated from the following file: