aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils')
-rw-r--r--tests/utils/ReferenceLinkDB.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php
index 36d58c68..29d63fac 100644
--- a/tests/utils/ReferenceLinkDB.php
+++ b/tests/utils/ReferenceLinkDB.php
@@ -4,7 +4,7 @@
4 */ 4 */
5class ReferenceLinkDB 5class ReferenceLinkDB
6{ 6{
7 public static $NB_LINKS_TOTAL = 8; 7 public static $NB_LINKS_TOTAL = 9;
8 8
9 private $_links = array(); 9 private $_links = array();
10 private $_publicCount = 0; 10 private $_publicCount = 0;
@@ -38,6 +38,16 @@ class ReferenceLinkDB
38 ); 38 );
39 39
40 $this->addLink( 40 $this->addLink(
41 9,
42 'PSR-2: Coding Style Guide',
43 'http://www.php-fig.org/psr/psr-2/',
44 'This guide extends and expands on PSR-1, the basic coding standard.',
45 0,
46 DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20121206_152312'),
47 ''
48 );
49
50 $this->addLink(
41 8, 51 8,
42 'Free as in Freedom 2.0 @website', 52 'Free as in Freedom 2.0 @website',
43 'https://static.fsf.org/nosvn/faif-2.0.pdf', 53 'https://static.fsf.org/nosvn/faif-2.0.pdf',
@@ -161,6 +171,20 @@ class ReferenceLinkDB
161 return $this->_privateCount; 171 return $this->_privateCount;
162 } 172 }
163 173
174 /**
175 * Returns the number of links without tag
176 */
177 public function countUntaggedLinks()
178 {
179 $cpt = 0;
180 foreach ($this->_links as $link) {
181 if (empty($link['tags'])) {
182 ++$cpt;
183 }
184 }
185 return $cpt;
186 }
187
164 public function getLinks() 188 public function getLinks()
165 { 189 {
166 return $this->_links; 190 return $this->_links;