Skip to content

Commit 4938d82

Browse files
Merge branch '2.7' into 2.8
* 2.7: Refactoring tests.
2 parents eeb7809 + fe70e0c commit 4938d82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/CrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function testAddXmlContentWithErrors()
180180
EOF
181181
, 'UTF-8');
182182

183-
$this->assertTrue(count(libxml_get_errors()) > 1);
183+
$this->assertGreaterThan(1, libxml_get_errors());
184184

185185
libxml_clear_errors();
186186
libxml_use_internal_errors($internalErrors);

Tests/FormTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ public function testOffsetUnset()
370370
{
371371
$form = $this->createForm('<form><input type="text" name="foo" value="foo" /><input type="submit" /></form>');
372372
unset($form['foo']);
373-
$this->assertFalse(isset($form['foo']), '->offsetUnset() removes a field');
373+
$this->assertArrayNotHasKey('foo', $form, '->offsetUnset() removes a field');
374374
}
375375

376376
public function testOffsetExists()
377377
{
378378
$form = $this->createForm('<form><input type="text" name="foo" value="foo" /><input type="submit" /></form>');
379379

380-
$this->assertTrue(isset($form['foo']), '->offsetExists() return true if the field exists');
381-
$this->assertFalse(isset($form['bar']), '->offsetExists() return false if the field does not exist');
380+
$this->assertArrayHasKey('foo', $form, '->offsetExists() return true if the field exists');
381+
$this->assertArrayNotHasKey('bar', $form, '->offsetExists() return false if the field does not exist');
382382
}
383383

384384
public function testGetValues()

0 commit comments

Comments
 (0)