/** * Создать набор дефолтных счетов */ public function testInsertDefaultAccounts() { $userId = CreateObjectHelper::makeUser(); $date = date('Y-m-d H:i:s'); Login_Model::defaultAccounts($userId); $count = $this->getConnection()->selectCell("SELECT count(*) FROM accounts WHERE user_id=?", $userId); $this->assertTrue((bool) $count, "Expected accounts were created"); // Timestampable $cat = $this->getConnection()->selectRow("SELECT * FROM accounts WHERE user_id=? LIMIT 1", $userId); $this->assertEquals($date, $cat['created_at']); $this->assertEquals($cat['created_at'], $cat['updated_at']); }