3
3
4
4
class ActiveRecordCacheTest extends DatabaseTest
5
5
{
6
- public function set_up ($ connection_name =null )
6
+ public function setUp ($ connection_name =null )
7
7
{
8
8
if (!extension_loaded ('memcache ' ))
9
9
{
10
10
$ this ->markTestSkipped ('The memcache extension is not available ' );
11
11
return ;
12
12
}
13
13
14
- parent ::set_up ($ connection_name );
14
+ parent ::setUp ($ connection_name );
15
15
ActiveRecord \Config::instance ()->set_cache ('memcache://localhost ' );
16
16
}
17
17
18
- public function tear_down ()
18
+ public function tearDown ()
19
19
{
20
20
Cache::flush ();
21
21
Cache::initialize (null );
22
22
}
23
23
24
24
public function test_default_expire ()
25
25
{
26
- $ this ->assert_equals (30 ,Cache::$ options ['expire ' ]);
26
+ $ this ->assertEquals (30 ,Cache::$ options ['expire ' ]);
27
27
}
28
28
29
29
public function test_explicit_default_expire ()
30
30
{
31
31
ActiveRecord \Config::instance ()->set_cache ('memcache://localhost ' ,array ('expire ' => 1 ));
32
- $ this ->assert_equals (1 ,Cache::$ options ['expire ' ]);
32
+ $ this ->assertEquals (1 ,Cache::$ options ['expire ' ]);
33
33
}
34
34
35
35
public function test_caches_column_meta_data ()
@@ -38,7 +38,7 @@ public function test_caches_column_meta_data()
38
38
39
39
$ table_name = Author::table ()->get_fully_qualified_table_name (!($ this ->conn instanceof ActiveRecord \PgsqlAdapter));
40
40
$ value = Cache::$ adapter ->read ("get_meta_data- $ table_name " );
41
- $ this ->assert_true (is_array ($ value ));
41
+ $ this ->assertTrue (is_array ($ value ));
42
42
}
43
43
}
44
44
0 commit comments