Skip to content
Extraits de code Groupes Projets
Valider 869e5715 rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Removed deprecated method scheduled for removal (fixing unit tests)

parent e6333c28
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -298,36 +298,6 @@ class Archive ...@@ -298,36 +298,6 @@ class Archive
return $result; return $result;
} }
/**
* Queries and returns blob data in an array.
*
* Reports are stored in blobs as serialized arrays of {@link DataTable\Row} instances, but this
* data can technically be anything. In other words, you can store whatever you want
* as archive data blobs.
*
* If multiple sites were requested in {@link build()} or {@link factory()} the result will
* be indexed by site ID.
*
* If multiple periods were requested in {@link build()} or {@link factory()} the result will
* be indexed by period.
*
* The site ID index is always first, so if multiple sites & periods were requested, the result
* will be indexed by site ID first, then period.
*
* @param string|array $names One or more archive names, eg, `'Referrers_keywordBySearchEngine'`.
* @param null|string $idSubtable If we're returning serialized DataTable data, then this refers
* to the subtable ID to return. If set to 'all', all subtables
* of each requested report are returned.
* @return array An array of appropriately indexed blob data.
*
* @deprecated since Piwik 2.12. Use one of the getDatable* methods instead.
*/
public function getBlob($names, $idSubtable = null)
{
$data = $this->get($names, 'blob', $idSubtable);
return $data->getIndexedArray($this->getResultIndices());
}
/** /**
* Queries and returns metric data in a DataTable instance. * Queries and returns metric data in a DataTable instance.
* *
......
...@@ -193,28 +193,6 @@ class OneVisitorTwoVisitsTest extends SystemTestCase ...@@ -193,28 +193,6 @@ class OneVisitorTwoVisitsTest extends SystemTestCase
); );
} }
/**
* Test that Archive::getBlob won't fetch extra unnecessary blobs.
*/
public function testArchiveSingleGetBlob()
{
$archive = Archive::build(self::$fixture->idSite, 'day', self::$fixture->dateTime);
$cache = $archive->getBlob('Actions_actions', 'all');
$foundSubtable = false;
$this->assertTrue(count($cache) > 0, "empty blob cache");
foreach ($cache as $name => $value) {
$this->assertTrue(strpos($name, "Actions_actions_url") === false, "found blob w/ name '$name'");
if (strpos($name, "Actions_actions_") !== false) {
$foundSubtable = true;
}
}
$this->assertTrue($foundSubtable, "Actions_actions subtable was not loaded");
}
/** /**
* Test that restricting the number of sites to those viewable to another login * Test that restricting the number of sites to those viewable to another login
* works when building an archive query object. * works when building an archive query object.
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter