X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Futils%2FReferenceLinkDB.php;h=47b51829989018906824c0cdc34b2f154764b0bc;hb=05af6f53256056eacb3813aff8aa606e83365f61;hp=2cb05baeb8a8406c060691aea1dc30eacde3249a;hpb=e88368518dc35beac203c26d5e8ed1411d6f926c;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index 2cb05bae..47b51829 100644 --- a/tests/utils/ReferenceLinkDB.php +++ b/tests/utils/ReferenceLinkDB.php @@ -4,9 +4,9 @@ */ class ReferenceLinkDB { - private $links = array(); - private $publicCount = 0; - private $privateCount = 0; + private $_links = array(); + private $_publicCount = 0; + private $_privateCount = 0; /** * Populates the test DB with reference data @@ -81,23 +81,23 @@ class ReferenceLinkDB 'linkdate' => $date, 'tags' => $tags, ); - $this->links[$date] = $link; + $this->_links[$date] = $link; if ($private) { - $this->privateCount++; + $this->_privateCount++; return; } - $this->publicCount++; + $this->_publicCount++; } /** * Writes data to the datastore */ - public function write($filename, $prefix, $suffix) + public function write($filename) { file_put_contents( $filename, - $prefix.base64_encode(gzdeflate(serialize($this->links))).$suffix + '_links))).' */ ?>' ); } @@ -106,7 +106,7 @@ class ReferenceLinkDB */ public function countLinks() { - return $this->publicCount + $this->privateCount; + return $this->_publicCount + $this->_privateCount; } /** @@ -114,7 +114,7 @@ class ReferenceLinkDB */ public function countPublicLinks() { - return $this->publicCount; + return $this->_publicCount; } /** @@ -122,7 +122,6 @@ class ReferenceLinkDB */ public function countPrivateLinks() { - return $this->privateCount; + return $this->_privateCount; } } -?>