The most common way to do this is through a loop akin to the following:
$results=array();
while($row=$test_stmt->fetch())
{
$results[]=$row;
}
This inserts the row into the results variable, which is an array. At the end of the loop, the array will contain a copy of everything the query returned.
You can also pick and choose what you do with particular columns in the results like this:
$results=array();
while($row=$test_stmt->fetch())
{
$results[]['ID']=$row['ID'];
}
This assumes there is a column called "ID" in the results though.