Exemplo n.º 1
0
 private function getInteractionTable()
 {
     //Returns a presentable HTML table of the user's friend interaction
     $warning = "These numbers indicate scores and do not refer to the amount found";
     $result = "\n\t\t\t<h5>Interaction</h5>\n\t\t\t<p></p>\n\t\t\t<table class='facts interaction' border='0'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th title='{$warning}'>Likes<b>*</b></th>\n\t\t\t\t\t<th title='{$warning}'>Comments<b>*</b></th>\n\t\t\t\t\t<th title='{$warning}'>Tags<b>*</b></th>\n\t\t\t\t</tr>\n\t\t";
     foreach ($this->Data['interaction'] as $id => $person) {
         $name = $person['name'];
         $result .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td><a href='https://facebook.com/{$id}' target='_blank' title=\"Go to " . (Engine::endsWith($name, "s") ? $name . "'" : $name . "'s") . " profile\">{$name}</a></td>\t\n\t\t\t\t\t<td>" . $person['likes'] . "</td>\t\n\t\t\t\t\t<td>" . $person['comments'] . "</td>\t\n\t\t\t\t\t<td>" . $person['tags'] . "</td>\t\n\t\t\t\t</tr>\n\t\t\t";
     }
     return $result . "\n\t\t\t</table>\n\t\t\t<p><i><b>*</b> {$warning}</i></p>\n\t\t";
 }
Exemplo n.º 2
0
 public function test_getTemplates()
 {
     //We need to test the getTemplates function in Engine so that we are able to
     //get all the available templates within the system we then test to make sure
     //that the template includes a real directory and filename. A correct template
     //will use the filename main.php
     foreach (Engine::getTemplates() as $value) {
         $this->assertEquals(true, file_exists($value) && Engine::endsWith($value, "main.php"));
     }
 }