update to phpunit 8

This commit is contained in:
itismadness
2020-10-03 18:42:13 +00:00
parent 1b414569bd
commit 93707559cc
4 changed files with 13 additions and 21 deletions
+4 -12
View File
@@ -418,18 +418,13 @@ class BencodeTorrentTest extends \PHPUnit\Framework\TestCase {
$this->assertFalse($bencode->hasFiles());
}
/**
* @expectedException \RuntimeException
*/
public function testInvalidSet() {
$data = ['encoding' => 'UTF8', 'announce' => 'http://localhost:8080/announce'];
$bencode = new BencodeTorrent();
$this->expectException(\RuntimeException::class);
$bencode->setData($data);
}
/**
* @expectedException \RuntimeException
*/
public function testInvalidSetValue() {
$data = [
'encoding' => 'UTF8',
@@ -442,20 +437,16 @@ class BencodeTorrentTest extends \PHPUnit\Framework\TestCase {
$bencode = new BencodeTorrent();
$bencode->setData($data);
$this->expectException(\RuntimeException::class);
$bencode->setValue(['info' => []]);
}
/**
* @expectedException \RuntimeException
*/
public function testGetEncodeNoData() {
$bencode = new BencodeTorrent();
$this->expectException(\RuntimeException::class);
$bencode->getEncode();
}
/**
* @expectedException \RuntimeException
*/
public function testInvalidPath() {
$data = [
'encoding' => 'UTF8',
@@ -472,6 +463,7 @@ class BencodeTorrentTest extends \PHPUnit\Framework\TestCase {
]
];
$bencode = new BencodeTorrent();
$this->expectException(\RuntimeException::class);
$bencode->setData($data);
}
}