public function testRemove() { $path = new Path('/toto/le/heros/masson'); $path->remove('toto'); $this->assertSame('le/heros/masson', (string) $path); $path->remove('ros/masson'); $this->assertSame('le/heros/masson', (string) $path); $path->remove('asson'); $this->assertSame('le/heros/masson', (string) $path); $path->remove('/heros/masson'); $this->assertSame('le', (string) $path); $path = new Path('/toto/le/heros/masson'); $path->remove('le/heros'); $this->assertSame('toto/masson', (string) $path); }