@@ -37,18 +37,18 @@ public function test_construct()
3737 public function test_is_runnable ()
3838 {
3939 $ task = $ this ->get_task ();
40- $ this ->assertEquals ($ task ->is_runnable (), true );
40+ $ this ->assertTrue ($ task ->is_runnable ());
4141 }
4242
4343 public function test_should_run ()
4444 {
4545 // 1: Has not run ever
4646 $ task = $ this ->get_task ();
47- $ this ->assertEquals ($ task ->should_run (), true );
47+ $ this ->assertTrue ($ task ->should_run ());
4848
4949 // 2: Has just run
5050 $ task = $ this ->get_task (time () - 1 );
51- $ this ->assertEquals ( $ task ->should_run (), false );
51+ $ this ->assertTrue (! $ task ->should_run ());
5252 }
5353
5454 public function test_run ()
@@ -59,11 +59,13 @@ public function test_run()
5959
6060 $ result = $ this ->db ->sql_query ($ sql );
6161 $ row = $ this ->db ->sql_fetchrow ($ result );
62+ $ this ->db ->sql_freeresult ($ result );
6263 $ this ->assertEquals ($ row ['cnt ' ], 2 );
6364
6465 $ sql = 'SELECT snippet_id FROM phpbb_pastebin ' ;
6566 $ result = $ this ->db ->sql_query ($ sql );
6667 $ rows = $ this ->db ->sql_fetchrowset ($ result );
68+ $ this ->db ->sql_freeresult ($ result );
6769 $ this ->assertEquals ($ rows , array (array ('snippet_id ' => 1 ), array ('snippet_id ' => 3 )));
6870 }
6971
0 commit comments