Skip to content

Commit 642f1e6

Browse files
authored
Merge pull request #107 from pascalbaljet/php-8.0
Support for PHP 8.0
2 parents 16d7fd5 + 13a9fab commit 642f1e6

18 files changed

Lines changed: 60 additions & 24 deletions

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ matrix:
1313
- php: 7.1
1414
- php: 7.2
1515
- php: 7.3
16+
- php: 7.4
17+
- php: 8.0snapshot
1618

1719
before_script:
1820
- composer install

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
}
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "~4"
17+
"phpunit/phpunit": "~4|^9.0"
1818
},
1919
"suggest": {
2020
"ext-mbstring": "For best performance",
2121
"symfony/polyfill-mbstring": "If you can't install ext-mbstring"
2222
}
23-
}
23+
}

test/BasicTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class BasicTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class BasicTest extends TestCase
68
{
79
public function basicDataProvider() {
810
return array(

test/BlockquoteTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class BlockquoteTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class BlockquoteTest extends TestCase
68
{
79
public function blockquoteDataProvider()
810
{

test/ConstructorTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class ConstructorTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class ConstructorTest extends TestCase
68
{
79
public function testConstructor()
810
{
@@ -29,7 +31,10 @@ public function testLegacyConstructorThrowsExceptionWhenFromFileIsTrue()
2931
$html = 'Foo';
3032
$options = array('do_links' => 'none');
3133

32-
$this->setExpectedException('InvalidArgumentException');
34+
method_exists($this, 'expectException')
35+
? $this->expectException('InvalidArgumentException')
36+
: $this->setExpectedException('InvalidArgumentException');
37+
3338
$html2text = new Html2Text($html, true, $options);
3439
}
3540
}

test/DefinitionListTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class DefinitionListTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class DefinitionListTest extends TestCase
68
{
79
public function testDefinitionList()
810
{

test/DelTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class DelTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class DelTest extends TestCase
68
{
79
public function testDel()
810
{

test/HtmlCharsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class HtmlCharsTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class HtmlCharsTest extends TestCase
68
{
79
public function testLaquoAndRaquo()
810
{

test/ImageTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class ImageTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class ImageTest extends TestCase
68
{
79
public function testImageDataProvider() {
810
return array(

test/InsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Html2Text;
44

5-
class InsTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
class InsTest extends TestCase
68
{
79
public function testIns()
810
{

0 commit comments

Comments
 (0)