Пример #1
0
 function testAfterGetProperties()
 {
     $properties = array('href' => 'foo', '200' => array('{DAV:}displayname' => 'foo', '{DAV:}getcontentlength' => 500), '404' => array('{DAV:}bar' => null), '403' => array('{DAV:}owner' => null));
     $expected = array('href' => 'foo', '200' => array('{DAV:}displayname' => 'foo', '{DAV:}getcontentlength' => 500), '404' => array('{DAV:}bar' => null), '403' => array('{DAV:}owner' => null));
     $r = $this->server->broadcastEvent('afterGetProperties', array('testdir', &$properties));
     $this->assertTrue($r);
     $this->assertEquals($expected, $properties);
 }
Пример #2
0
 function testBeforeGetPropertiesNoListing()
 {
     $this->plugin->hideNodesFromListings = true;
     $requestedProperties = array('{DAV:}displayname', '{DAV:}getcontentlength', '{DAV:}bar', '{DAV:}owner');
     $returnedProperties = array();
     $arguments = array('testdir', new DAV\SimpleCollection('testdir'), &$requestedProperties, &$returnedProperties);
     $r = $this->server->broadcastEvent('beforeGetProperties', $arguments);
     $this->assertFalse($r);
 }