示例#1
0
 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);
 }
示例#2
0
 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;
 }