Skip to content

Commit 40ef380

Browse files
committed
Run tests on PHPUnit 9
1 parent 9943b55 commit 40ef380

11 files changed

Lines changed: 71 additions & 132 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"require-dev": {
1414
"clue/block-react": "^1.2",
15-
"phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
15+
"phpunit/phpunit": "^9.0 || ^4.8.35"
1616
},
1717
"autoload": {
1818
"psr-4": { "React\\Dns\\": "src" }

tests/Config/ConfigTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ public function testLoadsFromExplicitPath()
3232
$this->assertEquals(array('8.8.8.8'), $config->nameservers);
3333
}
3434

35-
/**
36-
* @expectedException RuntimeException
37-
*/
3835
public function testLoadThrowsWhenPathIsInvalid()
3936
{
37+
$this->setExpectedException('RuntimeException');
4038
Config::loadResolvConfBlocking(__DIR__ . '/invalid.conf');
4139
}
4240

tests/Config/HostsFileTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ public function testDefaultShouldHaveLocalhostMapped()
2525
$this->assertContains('127.0.0.1', $hosts->getIpsForHost('localhost'));
2626
}
2727

28-
/**
29-
* @expectedException RuntimeException
30-
*/
3128
public function testLoadThrowsForInvalidPath()
3229
{
30+
$this->setExpectedException('RuntimeException');
3331
HostsFile::loadFromPathBlocking('does/not/exist');
3432
}
3533

tests/FunctionalResolverTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
class FunctionalTest extends TestCase
1111
{
12-
public function setUp()
12+
/**
13+
* @before
14+
*/
15+
public function setUpResolver()
1316
{
1417
$this->loop = LoopFactory::create();
1518

0 commit comments

Comments
 (0)