12 use PHPUnit\Framework\TestCase;
25 $xmlStyle = new \SimpleXMLElement($style);
26 foreach ($xmlStyle as $child) {
27 if ($child->getName() ===
"info") {
28 foreach ($child as $subChild) {
29 if ($subChild->getName() ===
"id") {
30 $this->assertEquals(
"http://www.zotero.org/styles/din-1505-2", (
string) $subChild);
47 $xmlLocales = new \SimpleXMLElement($locales);
48 foreach ($xmlLocales as $child) {
49 if ($child->getName() ===
"terms") {
50 foreach ($child as $term) {
52 if (
"and" === (
string) $term[
"name"]) {
53 $this->assertEquals(
"und", (
string) $term);
70 $this->assertObjectHasAttribute(
'primary-dialects', $metadata);
71 $this->assertObjectHasAttribute(
'en', $metadata->{
'primary-dialects'});
81 $xmlLocales = new \SimpleXMLElement($locales);
82 foreach ($xmlLocales as $child) {
83 if ($child->getName() ===
"terms") {
84 foreach ($child as $term) {
86 if (
"and" === (
string) $term[
"name"]) {
87 $this->assertEquals(
"und", (
string) $term);