@@ -49,17 +49,17 @@ public function testWriteRubyHtml(): void
4949
5050 $ dom = Helper::getAsHTML ($ phpWord , '' , '' , ['ruby ' , 'rt ' , 'rp ' ]);
5151 $ xpath = new DOMXPath ($ dom );
52- self ::assertEquals (1 , $ xpath ->query ('/html/body/div/ruby ' )->length );
52+ self ::assertSame (1 , $ xpath ->query ('/html/body/div/ruby ' )->length );
5353 // ensure text is right
5454 $ rubyElement = $ dom ->getElementsByTagName ('ruby ' )->item (0 );
5555 $ rtElement = $ dom ->getElementsByTagName ('rt ' )->item (0 );
5656 self ::assertNotNull ($ rubyElement );
5757 self ::assertNotNull ($ rtElement );
58- self ::assertEquals ($ baseTextRun ->getText () . ' ( ' . $ rubyTextRun ->getText () . ') ' , $ rubyElement ->textContent );
59- self ::assertEquals ($ rubyTextRun ->getText (), $ rtElement ->textContent );
58+ self ::assertSame ($ baseTextRun ->getText () . ' ( ' . $ rubyTextRun ->getText () . ') ' , $ rubyElement ->textContent );
59+ self ::assertSame ($ rubyTextRun ->getText (), $ rtElement ->textContent );
6060 // check style
61- self ::assertEquals ('font-size:20pt;ruby-align:center; ' , $ rubyElement ->attributes ->getNamedItem ('style ' )->textContent );
62- self ::assertEquals ('font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
61+ self ::assertSame ('font-size:20pt;ruby-align:center; ' , $ rubyElement ->attributes ->getNamedItem ('style ' )->textContent );
62+ self ::assertSame ('font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
6363 }
6464
6565 /**
@@ -94,28 +94,28 @@ public function testWriteRubyHtmlParagraphStyle(): void
9494
9595 $ dom = Helper::getAsHTML ($ phpWord , '' , '' , ['ruby ' , 'rt ' , 'rp ' ]);
9696 $ xpath = new DOMXPath ($ dom );
97- self ::assertEquals (2 , $ xpath ->query ('/html/body/div/ruby ' )->length );
97+ self ::assertSame (2 , $ xpath ->query ('/html/body/div/ruby ' )->length );
9898 // ensure text is right
9999 $ rubyElement = $ dom ->getElementsByTagName ('ruby ' )->item (0 );
100100 $ rtElement = $ dom ->getElementsByTagName ('rt ' )->item (0 );
101101 self ::assertNotNull ($ rubyElement );
102102 self ::assertNotNull ($ rtElement );
103- self ::assertEquals ($ baseTextRun ->getText () . ' ( ' . $ rubyTextRun ->getText () . ') ' , $ rubyElement ->textContent );
104- self ::assertEquals ($ rubyTextRun ->getText (), $ rtElement ->textContent );
103+ self ::assertSame ($ baseTextRun ->getText () . ' ( ' . $ rubyTextRun ->getText () . ') ' , $ rubyElement ->textContent );
104+ self ::assertSame ($ rubyTextRun ->getText (), $ rtElement ->textContent );
105105 // check style
106- self ::assertEquals ('line-height: 8;font-size:20pt;ruby-align:center; ' , $ rubyElement ->attributes ->getNamedItem ('style ' )->textContent );
107- self ::assertEquals ('line-height: 4;font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
106+ self ::assertSame ('line-height: 8;font-size:20pt;ruby-align:center; ' , $ rubyElement ->attributes ->getNamedItem ('style ' )->textContent );
107+ self ::assertSame ('line-height: 4;font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
108108
109109 // ensure text is right
110110 $ rubyElement2 = $ dom ->getElementsByTagName ('ruby ' )->item (1 );
111111 $ rtElement2 = $ dom ->getElementsByTagName ('rt ' )->item (1 );
112112 self ::assertNotNull ($ rubyElement2 );
113113 self ::assertNotNull ($ rtElement2 );
114- self ::assertEquals ($ baseTextRun2 ->getText () . ' ( ' . $ rubyTextRun2 ->getText () . ') ' , $ rubyElement2 ->textContent );
115- self ::assertEquals ($ rubyTextRun2 ->getText (), $ rtElement2 ->textContent );
114+ self ::assertSame ($ baseTextRun2 ->getText () . ' ( ' . $ rubyTextRun2 ->getText () . ') ' , $ rubyElement2 ->textContent );
115+ self ::assertSame ($ rubyTextRun2 ->getText (), $ rtElement2 ->textContent );
116116 // check style
117- self ::assertEquals ('font-size:24pt;ruby-align:space-between; ' , $ rubyElement2 ->attributes ->getNamedItem ('style ' )->textContent );
118- self ::assertEquals ('lineHeight10 ' , $ rubyElement2 ->attributes ->getNamedItem ('class ' )->textContent );
119- self ::assertEquals ('line-height: 4;font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
117+ self ::assertSame ('font-size:24pt;ruby-align:space-between; ' , $ rubyElement2 ->attributes ->getNamedItem ('style ' )->textContent );
118+ self ::assertSame ('lineHeight10 ' , $ rubyElement2 ->attributes ->getNamedItem ('class ' )->textContent );
119+ self ::assertSame ('line-height: 4;font-size:10pt; ' , $ rtElement ->attributes ->getNamedItem ('style ' )->textContent );
120120 }
121121}
0 commit comments