Horde_Share_TestBase::_listSharesJohn PHP Method

_listSharesJohn() public method

public _listSharesJohn ( )
    public function _listSharesJohn()
    {
        // Default listing.
        $shares = self::$share->listShares('john');
        $this->assertInternalType('array', $shares);
        $this->assertEquals(5, count($shares));
        // Test arguments for default listing.
        $this->assertEquals($shares, self::$share->listShares('john', array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0)));
        // Getting back the correct shares?
        $shares = self::$share->listShares('john', array('all_levels' => false, 'sort_by' => 'id'));
        $this->assertSortedById(array('myshare', 'systemshare', 'janeshare', 'groupshare'), $shares);
        // Shares of a certain owner.
        $shares = self::$share->listShares('john', array('attributes' => 'jane', 'sort_by' => 'id'));
        $this->assertSortedById(array('janeshare', 'groupshare'), $shares);
    }