Fix matching output for the class methods unit test.

The array returnd by getMethods cannot be directly dumped for PDOStatement
because it is too long for preg_match to match against the expectf.

Fixes #1624.