@@ -73,8 +73,8 @@ public function testWriteTrackChanges()
73
73
$ dom = $ this ->getAsHTML ($ phpWord );
74
74
$ xpath = new \DOMXPath ($ dom );
75
75
76
- $ this ->assertTrue ( $ xpath ->query ('/html/body/p[1]/ins ' )->length == 1 );
77
- $ this ->assertTrue ( $ xpath ->query ('/html/body/p[2]/del ' )->length == 1 );
76
+ $ this ->assertEquals ( 1 , $ xpath ->query ('/html/body/p[1]/ins ' )->length );
77
+ $ this ->assertEquals ( 1 , $ xpath ->query ('/html/body/p[2]/del ' )->length );
78
78
}
79
79
80
80
/**
@@ -97,9 +97,9 @@ public function testWriteColSpan()
97
97
$ dom = $ this ->getAsHTML ($ phpWord );
98
98
$ xpath = new \DOMXPath ($ dom );
99
99
100
- $ this ->assertTrue ( $ xpath ->query ('/html/body/table/tr[1]/td ' )->length == 1 );
100
+ $ this ->assertEquals ( 1 , $ xpath ->query ('/html/body/table/tr[1]/td ' )->length );
101
101
$ this ->assertEquals ('2 ' , $ xpath ->query ('/html/body/table/tr/td[1] ' )->item (0 )->attributes ->getNamedItem ('colspan ' )->textContent );
102
- $ this ->assertTrue ( $ xpath ->query ('/html/body/table/tr[2]/td ' )->length == 2 );
102
+ $ this ->assertEquals ( 2 , $ xpath ->query ('/html/body/table/tr[2]/td ' )->length );
103
103
}
104
104
105
105
/**
@@ -126,9 +126,9 @@ public function testWriteRowSpan()
126
126
$ dom = $ this ->getAsHTML ($ phpWord );
127
127
$ xpath = new \DOMXPath ($ dom );
128
128
129
- $ this ->assertTrue ( $ xpath ->query ('/html/body/table/tr[1]/td ' )->length == 2 );
129
+ $ this ->assertEquals ( 2 , $ xpath ->query ('/html/body/table/tr[1]/td ' )->length );
130
130
$ this ->assertEquals ('3 ' , $ xpath ->query ('/html/body/table/tr[1]/td[1] ' )->item (0 )->attributes ->getNamedItem ('rowspan ' )->textContent );
131
- $ this ->assertTrue ( $ xpath ->query ('/html/body/table/tr[2]/td ' )->length == 1 );
131
+ $ this ->assertEquals ( 1 , $ xpath ->query ('/html/body/table/tr[2]/td ' )->length );
132
132
}
133
133
134
134
private function getAsHTML (PhpWord $ phpWord )
@@ -155,6 +155,6 @@ public function testWriteTitleTextRun()
155
155
$ htmlWriter = new HTML ($ phpWord );
156
156
$ content = $ htmlWriter ->getContent ();
157
157
158
- $ this ->assertTrue ( strpos ( $ content , $ expected ) !== false );
158
+ $ this ->assertContains ( $ expected , $ content );
159
159
}
160
160
}
0 commit comments