blob: 51aa28da53ae2ac72fa8757caa7ccb87e09f2528 [file] [log] [blame]
<?php
class ezcWebdavLockPluginClientTestAssertions007
{
public function assertLockDiscoveryPropertyCorrect( ezcWebdavMemoryBackend $backend )
{
$prop = $backend->getProperty( '/collection/resource.html', 'lockdiscovery' );
PHPUnit_Framework_Assert::assertNotNull(
$prop,
'Lock discovery property not set.'
);
PHPUnit_Framework_Assert::assertInstanceOf(
'ezcWebdavLockDiscoveryProperty',
$prop,
'Lock discovery property has incorrect type.'
);
PHPUnit_Framework_Assert::assertEquals(
1,
count( $prop->activeLock ),
'Number of activeLock elements incorrect.'
);
PHPUnit_Framework_Assert::assertEquals(
new ezcWebdavPotentialUriContent(
'http://example.com/some/user',
true
),
$prop->activeLock[0]->owner,
'Lock owner not correct.'
);
}
public function assertLockDiscoveryPropertyNowhereElse( ezcWebdavMemoryBackend $backend )
{
$prop = $backend->getProperty( '/collection', 'lockdiscovery' );
PHPUnit_Framework_Assert::assertNull(
$prop
);
}
}
return new ezcWebdavLockPluginClientTestAssertions007();
?>