Rewrote tests because assertSelectCount is deprecated in the latest PHPUnit.