diff --git a/core/Archive.php b/core/Archive.php index a5d6c2960907e9638200258e950be130339eb39b..097ed9024d907218fefd0a8dde536a4b7cd15374 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -298,36 +298,6 @@ class Archive 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. * diff --git a/tests/PHPUnit/System/OneVisitorTwoVisitsTest.php b/tests/PHPUnit/System/OneVisitorTwoVisitsTest.php index 8ca82598466472cffe9b3b487e8b131dcf8e02d2..9aed096e77025619bfbc1864a84e7a57729174db 100755 --- a/tests/PHPUnit/System/OneVisitorTwoVisitsTest.php +++ b/tests/PHPUnit/System/OneVisitorTwoVisitsTest.php @@ -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 * works when building an archive query object.