Fix tests

This commit is contained in:
Romain Neutron
2012-10-03 20:30:05 +02:00
parent 1b2d004098
commit 004216bfc6
8 changed files with 36 additions and 14 deletions

View File

@@ -322,6 +322,21 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
return $this;
}
public static function unsetInstances()
{
foreach (self::$_instance as $id => $user) {
self::unsetInstance($id);
}
}
public static function unsetInstance($id)
{
if (isset(self::$_instance[$id])) {
self::$_instance[$id] = null;
unset(self::$_instance[$id]);
}
}
/**
*
* @param type $id

View File

@@ -542,7 +542,7 @@ class User_Query implements User_QueryInterface
$sql_count = 'SELECT COUNT(DISTINCT usr.usr_id) as total '
. $this->generate_sql_constraints();
$stmt = $conn->prepare($sql_count);
$stmt->execute($this->sql_params);
$row = $stmt->fetch(PDO::FETCH_ASSOC);