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 3
3
namespace Tests ;
4
4
5
5
use Scriptotek \Marc \Collection ;
6
+ use Scriptotek \Marc \Exceptions \XmlException ;
6
7
7
8
class CollectionTest extends TestCase
8
9
{
@@ -30,13 +31,12 @@ public function testBibsysOaiPmhSample()
30
31
}
31
32
32
33
/**
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).
34
36
*/
35
- public function testAlmaBibsApiExample ()
37
+ public function testExceptionOnInvalidEncoding ()
36
38
{
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);
40
40
$ this ->getTestCollection ('alma-bibs-api-invalid.xml ' );
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments