assertEquals( array(), $item->lockTokens ); $this->assertEquals( array(), $item->eTags ); $tokens = array( new ezcWebdavLockIfHeaderCondition( 'some lock token' ), new ezcWebdavLockIfHeaderCondition( 'another lock token', true ) ); $eTags = array( new ezcWebdavLockIfHeaderCondition( 'tag 1', true ), new ezcWebdavLockIfHeaderCondition( 'tag 2' ) ); $item = new ezcWebdavLockIfHeaderListItem( $tokens, $eTags ); $this->assertEquals( $tokens, $item->lockTokens ); $this->assertEquals( $eTags, $item->eTags ); } public function testSetAccessFailure() { $item = new ezcWebdavLockIfHeaderListItem(); try { $item->lockTokens = array(); $this->fail( 'Exception not thrown on set access to property $lockTokens.' ); } catch ( ezcBasePropertyPermissionException $e ) {} try { $item->eTags = array(); $this->fail( 'Exception not thrown on set access to property $eTags.' ); } catch ( ezcBasePropertyPermissionException $e ) {} try { $item->foo = 23; $this->fail( 'Exception not thrown on set access to property $foo.' ); } catch ( ezcBasePropertyNotFoundException $e ) {} } public function testIssetAccess() { $item = new ezcWebdavLockIfHeaderListItem(); $this->assertTrue( isset( $item->lockTokens ) ); $this->assertTrue( isset( $item->eTags ) ); $this->assertFalse( isset( $item->negated ) ); $this->assertFalse( isset( $item->foo ) ); } } ?>