Skip to content

Commit 53dfff4

Browse files
Merge branch '2.8' into 3.3
* 2.8: Refactoring tests.
2 parents cebe3c0 + 4938d82 commit 53dfff4

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
@@ -204,7 +204,7 @@ public function testAddXmlContentWithErrors()
204204
EOF
205205
, 'UTF-8');
206206

207-
$this->assertTrue(count(libxml_get_errors()) > 1);
207+
$this->assertGreaterThan(1, libxml_get_errors());
208208

209209
libxml_clear_errors();
210210
libxml_use_internal_errors($internalErrors);

Tests/FormTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,15 @@ public function testOffsetUnset()
376376
{
377377
$form = $this->createForm('<form><input type="text" name="foo" value="foo" /><input type="submit" /></form>');
378378
unset($form['foo']);
379-
$this->assertFalse(isset($form['foo']), '->offsetUnset() removes a field');
379+
$this->assertArrayNotHasKey('foo', $form, '->offsetUnset() removes a field');
380380
}
381381

382382
public function testOffsetExists()
383383
{
384384
$form = $this->createForm('<form><input type="text" name="foo" value="foo" /><input type="submit" /></form>');
385385

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

390390
public function testGetValues()

0 commit comments

Comments
 (0)