Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CurrentPassword.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\ObjectManager;
10 use Magento\Mtf\Fixture\FixtureInterface;
11 
15 class CurrentPassword implements FixtureInterface
16 {
22  protected $params;
23 
29  protected $data;
30 
36  public function __construct(array $params, $data = '')
37  {
38  $this->params = $params;
40  if ($data == '%current_password%') {
41  $systemConfig = ObjectManager::getInstance()->create(\Magento\Mtf\Config\DataInterface::class);
42  $data = $systemConfig->get('application/0/backendPassword/0/value');
43  }
44  $this->data = $data;
45  }
46 
52  public function persist()
53  {
54  //
55  }
56 
65  public function getData($key = null)
66  {
67  return $this->data;
68  }
69 
75  public function getDataConfig()
76  {
77  return $this->params;
78  }
79 }