public function testGetDependenciesWithDependencies() { $fields = array('field_4' => array('id' => 'section_2/group_3/field_4', 'value' => 'someValue', 'dependPath' => array('section_2', 'group_3', 'field_4')), 'field_1' => array('id' => 'section_1/group_3/field_1', 'value' => 'someValue', 'dependPath' => array('section_1', 'group_3', 'field_1'))); $this->_model->setData(array('depends' => array('fields' => $fields)), 0); $this->_depMapperMock->expects($this->once())->method('getDependencies')->with($fields, 'test_scope', 'test_prefix')->will($this->returnArgument(0)); $this->assertEquals($fields, $this->_model->getDependencies('test_prefix', 'test_scope')); }