Horde_Share_TestBase::countShares PHP Method

countShares() public method

public countShares ( )
    public function countShares()
    {
        // Getting shares from cache.
        $this->assertEquals(5, self::$share->countShares('john'));
        // Top level only.
        $this->assertEquals(2, self::$share->countShares('john', Horde_Perms::EDIT, null, null, false));
        $this->assertEquals(3, self::$share->countShares('john', Horde_Perms::EDIT));
        // Reset cache.
        self::$share->resetCache();
        // Getting shares from backend.
        $this->assertEquals(5, self::$share->countShares('john'));
        $this->assertEquals(2, self::$share->countShares('john', Horde_Perms::EDIT, null, null, false));
        $this->assertEquals(3, self::$share->countShares('john', Horde_Perms::EDIT));
    }

Usage Example

Esempio n. 1
0
 /**
  * @depends testPermissions
  */
 public function testCountShares()
 {
     parent::countShares();
 }