File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ public static function make($size)
1414 static ::ensureDependenciesAreLoaded ();
1515
1616 return extension_loaded ('openswoole ' )
17- ? new OpenSwooleTable ($ size )
18- : new SwooleTable ($ size );
17+ ? new OpenSwooleTable ($ size, 1 )
18+ : new SwooleTable ($ size, 1 );
1919 }
2020
2121 /**
Original file line number Diff line number Diff line change @@ -63,6 +63,17 @@ public function test_it_gets_used_while_creating_an_timer_table()
6363 return $ this ->assertInstanceOf (SwooleTable::class, $ table );
6464 }
6565
66+ public function test_can_use_all_available_rows ()
67+ {
68+ $ table = $ this ->createSwooleTable ();
69+
70+ for ($ i = 0 ; $ i < 1000 ; $ i ++) {
71+ $ table ->set ($ i , ['string ' => 'foo ' ]);
72+ }
73+
74+ $ this ->assertSame (1000 , $ table ->count ());
75+ }
76+
6677 /**
6778 * @dataProvider validStringValues
6879 */
You can’t perform that action at this time.
0 commit comments