Skip to content

Commit

Permalink
Drop support under PHP 7.4, update to PHPUnit 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojimage committed Oct 28, 2022
1 parent e578c2c commit 6efb72e
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=7.4",
"ext-mbstring": "*",
"ext-intl": "*"
},
"require-dev": {
"ext-json": "*",
"symfony/yaml": "^2.6.0|^3.4.0|^4.4.0|^5.0.0",
"phpunit/phpunit": "4.8.*|5.7.*|6.5.*",
"symfony/yaml": "^5.0.0",
"phpunit/phpunit": "^9.5",
"twitter/twitter-text": "^3.0.0"
},
"autoload": {
Expand Down
11 changes: 5 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
syntaxCheck="true">
convertWarningsToExceptions="true">

<testsuites>
<testsuite name="twitter">
<directory suffix=".php">tests/TestCase</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<coverage>
<include>
<directory suffix=".php">lib/Twitter</directory>
</whitelist>
</filter>
</include>
</coverage>

</phpunit>
4 changes: 2 additions & 2 deletions tests/TestCase/AutolinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
*/
class AutolinkTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->linker = new Autolink();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->linker);
parent::tearDown();
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ConfigurationTest extends TestCase
*
* @return void
*/
protected function setUp()
protected function setUp(): void
{
$this->config = new Configuration();
}
Expand All @@ -42,7 +42,7 @@ protected function setUp()
*
* @return void
*/
protected function tearDown()
protected function tearDown(): void
{
unset($this->config);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ConformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
class ConformanceTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->linker = new Autolink();
Expand All @@ -44,7 +44,7 @@ protected function setUp()
$this->parser = new Parser();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->linker);
parent::tearDown();
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ class ExtractorTest extends TestCase
*/
private $extractor;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->extractor = Extractor::create();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->extractor);
parent::tearDown();
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/HitHighlighterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
*/
class HitHighlighterTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->highlighter = new HitHighlighter();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->highlighter);
parent::tearDown();
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/InternalEncodingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/
class InternalEncodingTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
mb_internal_encoding('iso-8859-1');
Expand All @@ -46,7 +46,7 @@ protected function setUp()
$this->parser = new Parser();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->linker);
mb_internal_encoding('UTF-8');
Expand Down
7 changes: 4 additions & 3 deletions tests/TestCase/ParseResultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ParseResultsTest extends TestCase
*
* @return void
*/
protected function setUp()
protected function setUp(): void
{
$this->results = new ParseResults();
}
Expand All @@ -43,7 +43,7 @@ protected function setUp()
*
* @return void
*/
protected function tearDown()
protected function tearDown(): void
{
unset($this->results);
}
Expand Down Expand Up @@ -136,10 +136,11 @@ public function dataSetVariable()
* test set valiable
*
* @dataProvider dataSetInvalidRange
* @expectedException \RangeException
*/
public function testSetInvalidRange($message, $key, $value)
{
$this->expectException(\RangeException::class);

$this->results->$key = $value;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ParserTest extends TestCase
*
* @return void
*/
protected function setUp()
protected function setUp(): void
{
$this->parser = new Parser();
}
Expand All @@ -44,7 +44,7 @@ protected function setUp()
*
* @return void
*/
protected function tearDown()
protected function tearDown(): void
{
unset($this->parser);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/TldConformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
*/
class TldConformanceTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->extractor = new Extractor();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->extractor);
parent::tearDown();
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
*/
class ValidatorTest extends TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->validator = new Validator();
}

protected function tearDown()
protected function tearDown(): void
{
unset($this->validator);
parent::tearDown();
Expand Down

0 comments on commit 6efb72e

Please sign in to comment.