X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fkey_regexes.t;h=c1709f0a46ef835a3e5da5bd5fb1f8a4eb272c77;hb=2e4bde8970fc3d645faf7d6156860b069d61899e;hp=6cdaf26f88cf8226bd538935651ede2d2f1f393a;hpb=c28ee69c8da1ac598cb5ead407ebff06ee10cba2;p=catagits%2FCatalyst-Plugin-Cache.git diff --git a/t/key_regexes.t b/t/key_regexes.t index 6cdaf26..c1709f0 100644 --- a/t/key_regexes.t +++ b/t/key_regexes.t @@ -39,26 +39,26 @@ MockApp->register_cache_backend( default => MemoryCache->new ); MockApp->register_cache_backend( foo_store => MemoryCache->new ); MockApp->register_cache_backend( bar_store => MemoryCache->new ); -is( $c->choose_cache_backend_wrapper( key => "baz" ), $c->cache, "chose default" ); -is( $c->choose_cache_backend_wrapper( key => "foo" ), $c->cache("foo_store"), "chose foo" ); -is( $c->choose_cache_backend_wrapper( key => "bar" ), $c->cache("bar_store"), "chose bar" ); +is( $c->choose_cache_backend_wrapper( key => "baz" ), $c->default_cache_backend, "chose default" ); +is( $c->choose_cache_backend_wrapper( key => "foo" ), $c->get_cache_backend("foo_store"), "chose foo" ); +is( $c->choose_cache_backend_wrapper( key => "bar" ), $c->get_cache_backend("bar_store"), "chose bar" ); $c->cache_set( foo_laa => "laa" ); $c->cache_set( bar_laa => "laa" ); $c->cache_set( baz_laa => "laa" ); -is( $c->cache->get("baz_laa"), "laa", "non match stored in default" ); -is( $c->cache->get("foo_laa"), undef, "no foo key" ); -is( $c->cache->get("bar_laa"), undef, "no bar key" ); +is( $c->default_cache_backend->get("baz_laa"), "laa", "non match stored in default" ); +is( $c->default_cache_backend->get("foo_laa"), undef, "no foo key" ); +is( $c->default_cache_backend->get("bar_laa"), undef, "no bar key" ); -is( $c->cache("foo_store")->get("baz_laa"), undef, "no non match in foo store" ); -is( $c->cache("foo_store")->get("foo_laa"), "laa", "has foo key" ); -is( $c->cache("foo_store")->get("bar_laa"), undef, "no bar key" ); +is( $c->get_cache_backend("foo_store")->get("baz_laa"), undef, "no non match in foo store" ); +is( $c->get_cache_backend("foo_store")->get("foo_laa"), "laa", "has foo key" ); +is( $c->get_cache_backend("foo_store")->get("bar_laa"), undef, "no bar key" ); -is( $c->cache("bar_store")->get("baz_laa"), undef, "no non match in bar store" ); -is( $c->cache("bar_store")->get("foo_laa"), undef, "no foo key" ); -is( $c->cache("bar_store")->get("bar_laa"), "laa", "has bar key" ); +is( $c->get_cache_backend("bar_store")->get("baz_laa"), undef, "no non match in bar store" ); +is( $c->get_cache_backend("bar_store")->get("foo_laa"), undef, "no foo key" ); +is( $c->get_cache_backend("bar_store")->get("bar_laa"), "laa", "has bar key" );