public function testFetchAllNoneMissing() { $arr = array('foo' => 'bar'); $this->_mockBackend->shouldReceive('fetchAllCurrentlyKnownOptionNamesToValues')->once()->andReturn($arr); $this->_mockOptionsReference->shouldReceive('getAllOptionNames')->once()->andReturn(array('foo')); $result = $this->_sut->fetchAll(); $this->assertEquals($arr, $result); }
private function _buildMultiSourceFieldsFromStorage($hasErrors) { $allPersistedOptions = $this->_persistence->fetchAll(); $toReturn = $this->_buildMultiSourceFieldsFromStoredSources($allPersistedOptions, $hasErrors); if (!$toReturn) { $toReturn = $this->_buildMultiSourceFieldsFromLegacyStorage($allPersistedOptions, $hasErrors); } $this->_cachedGroupIds = array(); return $toReturn; }