X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Futils%2FReferenceLinkDB.php;h=da3e8c651a533d9ea2addc704e9573f2e6ca88df;hb=195acf9f0931aa3b1a6db8832ab52a260d11090d;hp=59ba671fc703274db61bbebae926ec350d2ac0f4;hpb=9c8752a2061e67c719125edb6e0d6717d1af8553;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index 59ba671f..da3e8c65 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 @@ -19,7 +19,7 @@ class ReferenceLinkDB 'Richard Stallman and the Free Software Revolution', 0, '20150310_114633', - 'free gnu software stallman' + 'free gnu software stallman -exclude' ); $this->addLink( @@ -28,7 +28,7 @@ class ReferenceLinkDB 'A free software media publishing platform', 0, '20130614_184135', - 'gnu media web' + 'gnu media web .hidden' ); $this->addLink( @@ -81,13 +81,13 @@ 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++; } /** @@ -97,7 +97,7 @@ class ReferenceLinkDB { file_put_contents( $filename, - 'links))).' */ ?>' + '_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,11 @@ class ReferenceLinkDB */ public function countPrivateLinks() { - return $this->privateCount; + return $this->_privateCount; + } + + public function getLinks() + { + return $this->_links; } } -?>