File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 33namespace Tests ;
44
55use Scriptotek \Marc \Collection ;
6+ use Scriptotek \Marc \Exceptions \XmlException ;
67
78class CollectionTest extends TestCase
89{
@@ -30,13 +31,12 @@ public function testBibsysOaiPmhSample()
3031 }
3132
3233 /**
33- * @expectedException Scriptotek\Marc\Exceptions\XmlException
34+ * Test that it XmlException is thrown when the specified encoding (UTF-16)
35+ * differs from the actual encoding (UTF-8).
3436 */
35- public function testAlmaBibsApiExample ()
37+ public function testExceptionOnInvalidEncoding ()
3638 {
37- // Expect failure because of invalid encoding in XML declaration:
38- // Document labelled UTF-16 but has UTF-8 content
39-
39+ $ this ->expectException (XmlException::class);
4040 $ this ->getTestCollection ('alma-bibs-api-invalid.xml ' );
4141 }
4242
You can’t perform that action at this time.
0 commit comments