Yii CDbTestCase findByAttributes正在创建一行

I am writing a unit test, and I stumbled upon a very strange behavior.

I have a test fixture so I expect to see 1 row in the database (there is only 1 row listed in the fixture) I wrote some code to run a findByAttributes as follows:

$client_id = 6;
$unique = array (
    "client_id" => (String) $client_id,
    "id" => "2" //I have a fixture that uses id 1
);

$model = Agent::model()->findByAttributes($unique);
die();

When I have this configuration after my test runs and the die is hit, I see 2 rows in the database. However if I do:

$client_id = 6;
$unique = array (
    "client_id" => (String) $client_id,
    "id" => "2" //I have a fixture that uses id 1
);

die();
$model = Agent::model()->findByAttributes($unique);
//NOTE: I only moved the die() above the findByAttributes.

I see only the 1 row from my fixture. Why is findByAttributes creating a row in my test DB?

Agent is a singleton model in my system. I guess I am doing something fancy.

Clearly a Singleton is going to create itself if one does not exist. Doh!