blob: 1720bae578ed21a20b844f2678802b74fd6f2b1e [file] [log] [blame]
<?php
class ezcWebdavLockPluginClientTestAssertions004
{
public function assertLockDiscoveryPropertyCorrect( ezcWebdavMemoryBackend $backend )
{
$prop = $backend->getProperty( '/collection/newcollection', '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 ezcWebdavLockPluginClientTestAssertions004();
?>