@@ -100,17 +100,20 @@ public function testInitErrorOnInvalidConfig()
100100 public function testProxyMethodsTracksMetrics ()
101101 {
102102 $ this ->engine ->get ('key ' );
103+ $ this ->engine ->has ('key ' );
103104 $ this ->engine ->set ('key ' , 'value ' );
104105 $ this ->engine ->get ('key ' );
106+ $ this ->engine ->has ('key ' );
107+ $ this ->engine ->add ('new-key ' , 'value ' );
105108 $ this ->engine ->delete ('key ' );
106109 $ this ->engine ->increment ('key ' );
107110 $ this ->engine ->decrement ('key ' );
108111
109112 $ result = $ this ->engine ->metrics ();
110- $ this ->assertSame (3 , $ result ['set ' ]);
113+ $ this ->assertSame (4 , $ result ['set ' ]);
111114 $ this ->assertSame (1 , $ result ['delete ' ]);
112- $ this ->assertSame (1 , $ result ['get miss ' ]);
113- $ this ->assertSame (1 , $ result ['get hit ' ]);
115+ $ this ->assertSame (2 , $ result ['get miss ' ]);
116+ $ this ->assertSame (2 , $ result ['get hit ' ]);
114117 }
115118
116119 /**
@@ -121,7 +124,9 @@ public function testProxyMethodsTracksMetrics()
121124 public function testProxyMethodLogs ()
122125 {
123126 $ this ->engine ->get ('key ' );
127+ $ this ->engine ->has ('key ' );
124128 $ this ->engine ->set ('key ' , 'value ' );
129+ $ this ->engine ->add ('new-key ' , 'value ' );
125130 $ this ->engine ->delete ('key ' );
126131 $ this ->engine ->increment ('key ' );
127132 $ this ->engine ->decrement ('key ' );
@@ -131,9 +136,11 @@ public function testProxyMethodLogs()
131136 $ this ->engine ->clearGroup ('group ' );
132137
133138 $ logs = $ this ->logger ->read ();
134- $ this ->assertCount (9 , $ logs );
139+ $ this ->assertCount (11 , $ logs );
135140 $ this ->assertStringStartsWith ('info: :test: get `key` ' , $ logs [0 ]);
136- $ this ->assertStringStartsWith ('info: :test: set `key` ' , $ logs [1 ]);
141+ $ this ->assertStringStartsWith ('info: :test: has `key` ' , $ logs [1 ]);
142+ $ this ->assertStringStartsWith ('info: :test: set `key` ' , $ logs [2 ]);
143+ $ this ->assertStringStartsWith ('info: :test: add `new-key` ' , $ logs [3 ]);
137144 }
138145
139146 /**
0 commit comments