/** * @depends testUpdatePropertiesMove */ function testUpdatePropertiesDeleteBleed() { $file = new File(SABRE_TEMPDIR . '/dir/file.txt'); $mutations = array('{http://sabredav.org/NS/2010}test1' => 'foo', '{http://sabredav.org/NS/2010}test2' => 'bar'); $propPatch = new PropPatch($mutations); $file->propPatch($propPatch); $result = $propPatch->commit(); $this->assertEquals(true, $result); $properties = $file->getProperties(array('{http://sabredav.org/NS/2010}test1', '{http://sabredav.org/NS/2010}test2', '{http://sabredav.org/NS/2010}test3')); $this->assertEquals(array('{http://sabredav.org/NS/2010}test1' => 'foo', '{http://sabredav.org/NS/2010}test2' => 'bar'), $properties); // Deleting $file->delete(); $this->assertFalse(file_exists(SABRE_TEMPDIR . '/dir/file.txt')); // Creating it again file_put_contents(SABRE_TEMPDIR . '/dir/file.txt', 'New Contents'); $file = new File(SABRE_TEMPDIR . '/dir/file.txt'); $properties = $file->getProperties(array('http://sabredav.org/NS/2010}test1', '{http://sabredav.org/NS/2010}test2', '{http://sabredav.org/NS/2010}test3')); $this->assertEquals(array(), $properties); }