Commit 38d58d58 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

+ Add possibility to specify fixture and retrieve it from loaded array

parent 1731f201
...@@ -348,6 +348,21 @@ class EcomDev_PHPUnit_Model_Fixture ...@@ -348,6 +348,21 @@ class EcomDev_PHPUnit_Model_Fixture
return $this; return $this;
} }
/**
* Returns value from fixture
*
* @param $key
* @return array[]
*/
public function getFixtureValue($key)
{
if (isset($this->_fixture[$key])) {
return $this->_fixture[$key];
}
return array();
}
/** /**
* Loads fixture files * Loads fixture files
* *
......
...@@ -135,6 +135,15 @@ interface EcomDev_PHPUnit_Model_Fixture_Interface extends EcomDev_PHPUnit_Model_ ...@@ -135,6 +135,15 @@ interface EcomDev_PHPUnit_Model_Fixture_Interface extends EcomDev_PHPUnit_Model_
*/ */
public function setFixtureValue($key, $value); public function setFixtureValue($key, $value);
/**
* Retrieves fixture value
*
* @param string $key
*
* @return array[]
*/
public function getFixtureValue($key);
/** /**
* Returns VFS wrapper instance * Returns VFS wrapper instance
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment