public function testSetEncoding() { $enc = new Encoding('UTF-8'); $this->assertEquals('UTF-8', $enc->getEncoding()); $this->setExpectedException('InvalidArgumentException'); $enc->setEncoding('NOPE'); }