public function testUnsubscribe() { $bo = BaseObject::getById(1); $this->assertEquals(1, $this->_permissionObject->getSubscriptionCount()); // This triggers the database pull, which should cause our permission object to run, // and to unsubscribe. $bo->getType(); $this->assertEquals(0, $this->_permissionObject->getSubscriptionCount()); $bo->canSee(); }
public function testCreateCallback() { BaseObject::staticSubscribe('create', $this->_subscriber, array()); $bo = BaseObject::getById(1); $this->assertEquals(1, $this->_incCount); $this->assertEquals($bo, $this->_lastOb); }