Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
test_general_status.inc
1 <?php
28 {
29 
30 
37  public static function getName()
38  {
39  return 'General Status Check';
40 
41  }//end getName()
42 
43 
50  public static function getDescription()
51  {
52  return 'A basic test to get a general status and statistics on the system';
53 
54  }//end getDescription()
55 
56 
66  public static function test(&$messages, &$errors)
67  {
68  $status = '2';
69 
70  $sql = 'SELECT COUNT(*) FROM sq_ast';
71  $result = MatrixDAL::executeSqlOne($sql);
72  if (!empty($result)) {
73  $messages[] = 'There are '.$result.' asset(s) on the system';
74  }//end if
75 
76  $sql = "SELECT COUNT(*) FROM sq_ast_lnk WHERE link_type<='4'";
77  $result = MatrixDAL::executeSqlOne($sql);
78  if (!empty($result)) {
79  $messages[] = 'There are '.$result.' asset link(s) on the system';
80  }//end if
81 
82  return $status;
83 
84  }//end test()
85 
86 }//end class
87 ?>