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

Public Member Functions

 testGetCondition ($expectedCondition, $value)
 
 getConditionDataProvider ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $object
 
 $objectManagerHelper
 
 $context
 
 $helper
 
 $store
 

Detailed Description

Definition at line 11 of file StoreTest.php.

Member Function Documentation

◆ getConditionDataProvider()

getConditionDataProvider ( )
Returns
array

Definition at line 59 of file StoreTest.php.

60  {
61  return [
62  [null, null],
63  [null, \Magento\Backend\Block\Widget\Grid\Column\Filter\Store::ALL_STORE_VIEWS],
64  [['eq' => 1], 1],
65  [['null' => true], '_deleted_'],
66  ];
67  }

◆ setUp()

setUp ( )
protected

Definition at line 28 of file StoreTest.php.

29  {
30  $this->context = $this->createMock(\Magento\Backend\Block\Context::class);
31  $this->helper = $this->createMock(\Magento\Framework\DB\Helper::class);
32  $this->store = $this->createMock(\Magento\Store\Model\System\Store::class);
33 
34  $this->objectManagerHelper = new ObjectManagerHelper($this);
35  $this->store = $this->objectManagerHelper->getObject(
36  \Magento\Backend\Block\Widget\Grid\Column\Filter\Store::class,
37  [
38  'context' => $this->context,
39  'resourceHelper' => $this->helper,
40  'systemStore' => $this->store
41  ]
42  );
43  }

◆ testGetCondition()

testGetCondition (   $expectedCondition,
  $value 
)
Parameters
null | array$expectedCondition
null | int | string$value@dataProvider getConditionDataProvider

Definition at line 50 of file StoreTest.php.

51  {
52  $this->store->setValue($value);
53  $this->assertSame($expectedCondition, $this->store->getCondition());
54  }
$value
Definition: gender.phtml:16

Field Documentation

◆ $context

$context
protected

Definition at line 20 of file StoreTest.php.

◆ $helper

$helper
protected

Definition at line 23 of file StoreTest.php.

◆ $object

$object
protected

Definition at line 14 of file StoreTest.php.

◆ $objectManagerHelper

$objectManagerHelper
protected

Definition at line 17 of file StoreTest.php.

◆ $store

$store
protected

Definition at line 26 of file StoreTest.php.


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