It is not good this class is declared inside the test.
CActiveRecordTest.php is already very complex.
I suggest we can create a new file "tests/db/data/helpers.php" or something like that. To hold classes like this.