33namespace SplitIO \Test \Suite \Component ;
44
55use SplitIO \Component \Cache \ImpressionCache ;
6- use SplitIO \Component \Cache \MetricsCache ;
76use SplitIO \Component \Cache \SplitCache ;
87use SplitIO \Component \Cache \SegmentCache ;
98use SplitIO \Component \Cache \TrafficTypeCache ;
@@ -18,48 +17,6 @@ private static function getStaticMethodAsPublic($className, $methodName)
1817 return $ refMethod ;
1918 }
2019
21- public function testMetricsGetCacheKeyForLatencyButcket ()
22- {
23- $ method = self ::getStaticMethodAsPublic ('SplitIO\Component\Cache\MetricsCache ' , 'getCacheKeyForLatencyBucket ' );
24- $ key = $ method ->invoke (null , 'abc ' , 'def ' );
25- $ this ->assertEquals (
26- $ key ,
27- 'SPLITIO/php- ' . \SplitIO \version () . '/ ' . \SplitIO \getHostIpAddress () . '/latency.abc.bucket.def '
28- );
29- }
30-
31- public function testGetCacheKeySearchLatencyPattern ()
32- {
33- $ method = self ::getStaticMethodAsPublic ('SplitIO\Component\Cache\MetricsCache ' , 'getCacheKeySearchLatencyPattern ' );
34- $ key = $ method ->invoke (null );
35- $ this ->assertEquals (
36- $ key ,
37- 'SPLITIO/php- ' . \SplitIO \version () . '/ ' . \SplitIO \getHostIpAddress () . '/latency.*.bucket.* '
38- );
39- }
40-
41- public function testGetMetricNameFromKey ()
42- {
43- $ method = self ::getStaticMethodAsPublic ('SplitIO\Component\Cache\MetricsCache ' , 'getMetricNameFromKey ' );
44- $ metricName = $ method ->invoke (
45- null ,
46- 'SPLITIO/php- ' . \SplitIO \version () . '/ ' . \SplitIO \getHostIpAddress () . '/latency.abc.bucket.def '
47- );
48-
49- $ this ->assertEquals ($ metricName , 'abc ' );
50- }
51-
52- public function testGetBucketFromKey ()
53- {
54- $ method = self ::getStaticMethodAsPublic ('SplitIO\Component\Cache\MetricsCache ' , 'getBucketFromKey ' );
55- $ metricName = $ method ->invoke (
56- null ,
57- 'SPLITIO/php- ' . \SplitIO \version () . '/ ' . \SplitIO \getHostIpAddress () . '/latency.abc.bucket.def '
58- );
59-
60- $ this ->assertEquals ($ metricName , 'def ' );
61- }
62-
6320 public function testSplitGetCacheKeyForSinceParameter ()
6421 {
6522 $ method = self ::getStaticMethodAsPublic ('SplitIO\Component\Cache\SplitCache ' , 'getCacheKeyForSinceParameter ' );
0 commit comments