public function executeActsForType()
 {
     $this->type_id = $this->type->getId();
     $this->type_denominazione = $this->type->getDescrizione();
     // filtri per ramo e stato avanzamento
     $act_filtering_criteria = null;
     if ($this->filters['act_ramo'] != '0') {
         if (is_null($act_filtering_criteria)) {
             $act_filtering_criteria = new Criteria();
         }
         $act_filtering_criteria->add(OppAttoPeer::RAMO, $this->filters['act_ramo']);
     }
     if ($this->filters['act_stato'] != '0') {
         if (is_null($act_filtering_criteria)) {
             $act_filtering_criteria = new Criteria();
         }
         $act_filtering_criteria->add(OppAttoPeer::STATO_COD, $this->filters['act_stato']);
     }
     $blocked_items_pks = sfBookmarkingPeer::getAllNegativelyBookmarkedIds($this->user_id);
     if (array_key_exists('OppAtto', $blocked_items_pks)) {
         if (is_null($act_filtering_criteria)) {
             $act_filtering_criteria = new Criteria();
         }
         $blocked_acts_pks = $blocked_items_pks['OppAtto'];
         $act_filtering_criteria->add(OppAttoPeer::ID, $blocked_acts_pks, Criteria::NOT_IN);
     }
     $indirectly_monitored_acts = OppAttoPeer::doSelectIndirectlyMonitoredByUser($this->user, $this->type, $this->tag_filtering_criteria, $this->my_monitored_tags_pks, $act_filtering_criteria);
     if ($this->filters['tag_id'] == '0') {
         $directly_monitored_acts = OppAttoPeer::doSelectDirectlyMonitoredByUser($this->user, $this->type, $act_filtering_criteria);
     } else {
         $directly_monitored_acts = array();
     }
     $monitored_acts = OppAttoPeer::merge($indirectly_monitored_acts, $directly_monitored_acts);
     $this->n_total_acts = count($monitored_acts);
     if ($this->filters['act_type_id'] == 0) {
         $monitored_acts = array_slice($monitored_acts, 0, sfConfig::get('app_monitored_acts_per_type_limit'));
     }
     $this->monitored_acts = $monitored_acts;
 }
    $t->fail('removeNegativeBookmarking() - a negative bookmark on obj1 could not be removed by user3');
}
$t->ok($obj1->countNegativeBookmarkings() == 1, 'countNegativeBookmarkings() - obj1 has one negative bookmarking.');
$t->ok($obj1->hasBeenPositivelyBookmarked($user_1_id) == true, 'hasBeenPositivelyBookmarked() - obj1 was positively bookmarked by user 1');
$t->ok($obj1->hasBeenNegativelyBookmarked($user_1_id) == false, 'hasBeenNegativelyBookmarked() - obj1 was NOT negatively bookmarked by user 1');
$t->ok($obj1->hasBeenPositivelyBookmarked($user_2_id) == false, 'hasBeenPositivelyBookmarked() - obj1 was NOT positively bookmarked by user 1');
$t->ok($obj1->hasBeenNegativelyBookmarked($user_2_id) == true, 'hasBeenNegativelyBookmarked() - obj1 was negatively bookmarked by user 1');
$t->ok($obj1->hasBeenNegativelyBookmarked($user_3_id) == false, 'hasBeenNegativelyBookmarked() - obj1 was NOT negatively bookmarked by user 1');
$t->diag('List of bookmarked objects');
$bookmarked_ids = sfBookmarkingPeer::getAllPositivelyBookmarkedIds($user_1_id);
$t->ok($bookmarked_ids[TEST_CLASS][0] == $obj1->getId(), 'sfBookmarkingPeer::getAllPositivelyBookmarkedIds() - is working');
$bookmarked_ids = sfBookmarkingPeer::getAllPositivelyBookmarkedIds($user_2_id);
$t->ok($bookmarked_ids == array(), 'sfBookmarkingPeer::getAllPositivelyBookmarkedIds() - empty case scenario');
$bookmarked_ids = sfBookmarkingPeer::getAllNegativelyBookmarkedIds($user_2_id);
$t->ok($bookmarked_ids[TEST_CLASS][0] == $obj1->getId(), 'sfBookmarkingPeer::getAllNegativelyBookmarkedIds() - is working');
$bookmarked_ids = sfBookmarkingPeer::getAllNegativelyBookmarkedIds($user_1_id);
$t->ok($bookmarked_ids == array(), 'sfBookmarkingPeer::getAllNegativelyBookmarkedIds() - empty case scenario');
$bookmarked_objs = sfBookmarkingPeer::getAllPositivelyBookmarked($user_1_id);
$t->ok($bookmarked_objs[0] == $obj1, 'sfBookmarkingPeer::getAllPositivelyBookmarked() - is working');
$bookmarked_objs = sfBookmarkingPeer::getAllNegativelyBookmarked($user_2_id);
$t->ok($bookmarked_objs[0] == $obj1, 'sfBookmarkingPeer::getAllNegativelyBookmarked() - is working');
$bookmarked_objs = sfBookmarkingPeer::getAllPositivelyBookmarked($user_2_id);
$t->ok($bookmarked_objs == array(), 'sfBookmarkingPeer::getAllPositivelyBookmarked() - empty case');
$t->diag('List of some toolkit methods');
$t->ok(deppPropelActAsBookmarkableToolkit::isBookmarkable(TEST_CLASS) == true, 'deppPropelActAsBookmarkableToolkit::isBookmarkable() - is working');
$t->diag('Tests terminated');
// test object creation
function _create_object()
{
    $classname = TEST_CLASS;
    $method = TEST_METHOD_SETTER;
 public static function getTodayNewsForUserCriteria($user, $date = null)
 {
     $monitored_objects = $user->getMonitoredObjects();
     // criterio di selezione delle news dagli oggetti monitorati
     $c = self::getMyMonitoredItemsNewsCriteria($monitored_objects);
     // eliminazione delle notizie relative agli oggetti bookmarkati negativamente (bloccati)
     $blocked_items_ids = sfBookmarkingPeer::getAllNegativelyBookmarkedIds($user->getId());
     if (array_key_exists('OppAtto', $blocked_items_ids) && count($blocked_items_ids['OppAtto'])) {
         $blocked_news_ids = array();
         $bc = new Criteria();
         $bc->add(self::RELATED_MONITORABLE_MODEL, 'OppAtto');
         $bc->add(self::RELATED_MONITORABLE_ID, $blocked_items_ids['OppAtto'], Criteria::IN);
         $bc->clearSelectColumns();
         $bc->addSelectColumn(self::ID);
         $rs = self::doSelectRS($bc);
         while ($rs->next()) {
             array_push($blocked_news_ids, $rs->getInt(1));
         }
         $c0 = $c->getNewCriterion(self::ID, $blocked_news_ids, Criteria::NOT_IN);
         $c->addAnd($c0);
     }
     // le news di gruppo non sono considerate, perché ridondanti (#247)
     $c->add(self::GENERATOR_PRIMARY_KEYS, null, Criteria::ISNOTNULL);
     // add a filter on the date (today's news) or a test date
     // remove news related to actions dated more than 15 days ago (related to the date passed)
     if (is_null($date)) {
         $date = date('Y-m-d');
     }
     # some dates
     $default_time = sfConfig::get('app_default_newsletter_sendtime', '12:45:00');
     $date_noon = date("Y-m-d {$default_time}", strtotime($date));
     $date_noon_minus_24 = date("Y-m-d {$default_time}", strtotime('1 day ago', strtotime($date)));
     $fifteen_days_ago = date('Y-m-d', strtotime('15 days ago', strtotime($date)));
     # today's news are last 24 hours news, starting at 12:45:00
     $crit0 = $c->getNewCriterion(self::CREATED_AT, $date_noon, Criteria::LESS_EQUAL);
     $crit1 = $c->getNewCriterion(self::CREATED_AT, $date_noon_minus_24, Criteria::GREATER_THAN);
     $crit0->addAnd($crit1);
     $c->add($crit0);
     # check date, if present
     $crit0 = $c->getNewCriterion(self::DATE, null, Criteria::ISNOTNULL);
     $crit1 = $c->getNewCriterion(self::DATE, $fifteen_days_ago, Criteria::GREATER_THAN);
     $crit0->addAnd($crit1);
     # check data_presentazione_atto, if present
     $crit2 = $c->getNewCriterion(self::DATA_PRESENTAZIONE_ATTO, null, Criteria::ISNOTNULL);
     $crit3 = $c->getNewCriterion(self::DATA_PRESENTAZIONE_ATTO, $fifteen_days_ago, Criteria::GREATER_THAN);
     $crit2->addAnd($crit3);
     # perform OR
     $crit0->addOr($crit2);
     # add orred criterion to main criteria
     $c->add($crit0);
     return $c;
 }