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

Public Member Functions

 getLargeSwatchesAmountAttributeData ()
 
- Public Member Functions inherited from AbstractBackendController
 assertSessionMessages (\PHPUnit\Framework\Constraint\Constraint $constraint, $messageType=null, $messageManagerClass=\Magento\Framework\Message\Manager::class)
 
 testAclHasAccess ()
 
 testAclNoAccess ()
 
- Public Member Functions inherited from AbstractController
 getRequest ()
 
 getResponse ()
 
 assert404NotFound ()
 
 assertHeaderPcre ($headerName, $valueRegex)
 
 assertRedirect (\PHPUnit\Framework\Constraint\Constraint $urlConstraint=null)
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from AbstractBackendController
 setUp ()
 
 _getAdminCredentials ()
 
 tearDown ()
 
- Protected Member Functions inherited from AbstractController
 _getBootstrap ()
 
 setUp ()
 
 tearDown ()
 
 assertPostConditions ()
 
 getMessages ( $messageType=null, $messageManagerClass=\Magento\Framework\Message\Manager::class)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractBackendController
 $_session
 
 $_auth
 
 $resource = null
 
 $uri = null
 
 $httpMethod
 
- Protected Attributes inherited from AbstractController
 $_runCode = ''
 
 $_runScope = 'store'
 
 $_runOptions = []
 
 $_request
 
 $_response
 
 $_objectManager
 
 $_assertSessionErrors = false
 

Detailed Description

Test for product attribute save controller.

@magentoAppArea adminhtml @magentoDbIsolation enabled

Definition at line 20 of file AttributeTest.php.

Member Function Documentation

◆ getLargeSwatchesAmountAttributeData()

getLargeSwatchesAmountAttributeData ( )

Data provider for large swatches amount test.

Returns
array

Definition at line 176 of file AttributeTest.php.

176  : array
177  {
178  $maxInputVars = ini_get('max_input_vars');
179  // Each option is at least 7 variables array for a visual swatch.
180  // Set options count to exceed max_input_vars by 20 options (140 variables).
181  $swatchVisualOptionsCount = (int)floor($maxInputVars / 7) + 20;
182  $swatchTextOptionsCount = (int)floor($maxInputVars / 4) + 80;
183  return [
184  'visual swatches' => $this->getSwatchVisualDataSet($swatchVisualOptionsCount),
185  'text swatches' => $this->getSwatchTextDataSet($swatchTextOptionsCount)
186  ];
187  }

◆ setUp()

setUp ( )
protected

@inheritDoc

Definition at line 30 of file AttributeTest.php.

31  {
32  parent::setUp();
33 
34  $this->formKey = $this->_objectManager->get(FormKey::class);
35  }

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