-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from ArthurHoaro/fix/phpunit-compat
- Loading branch information
Showing
19 changed files
with
75 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd" | ||
colors="true" | ||
bootstrap="./tests/bootstrap.php"> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/WebThumbnailer/</directory> | ||
<directory suffix=".php">tests/WebThumbnailer/</directory> | ||
</whitelist> | ||
</filter> | ||
<testsuites> | ||
<testsuite name="AllTests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging> | ||
<log type="coverage-html" target="coverage" lowUpperBound="30" highLowerBound="80"/> | ||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/> | ||
<log type="coverage-clover" target="coverage/logs/clover.xml"/> | ||
</logging> | ||
<php> | ||
<const name="WEB_SERVER_HOST" value="localhost" /> | ||
<const name="WEB_SERVER_PORT" value="8081" /> | ||
<const name="WEB_SERVER_DOCROOT" value="./tests/public" /> | ||
</php> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" colors="true" bootstrap="./tests/bootstrap.php"> | ||
<coverage includeUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/WebThumbnailer/</directory> | ||
<directory suffix=".php">tests/WebThumbnailer/</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="coverage/logs/clover.xml"/> | ||
<html outputDirectory="coverage" lowUpperBound="30" highLowerBound="80"/> | ||
<text outputFile="php://stdout" showUncoveredFiles="true"/> | ||
</report> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="AllTests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging/> | ||
<php> | ||
<const name="WEB_SERVER_HOST" value="localhost"/> | ||
<const name="WEB_SERVER_PORT" value="8081"/> | ||
<const name="WEB_SERVER_DOCROOT" value="./tests/public"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace WebThumbnailer\Utils; | ||
|
||
class TemplatePolyfill | ||
{ | ||
/** @return \Text_Template|\SebastianBergmann\Template\Template */ | ||
public static function get(string $file) | ||
{ | ||
if (class_exists('Text_Template')) { | ||
return new \Text_Template($file); | ||
} | ||
|
||
return new \SebastianBergmann\Template\Template($file); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace WebThumbnailer; | ||
|
||
class TestCase extends \PHPUnit\Framework\TestCase | ||
{ | ||
public function expectExceptionMessageRegExp(string $regularExpression): void | ||
{ | ||
if (method_exists($this, 'expectExceptionMessageMatches')) { | ||
$this->expectExceptionMessageMatches($regularExpression); | ||
} else { | ||
parent::expectExceptionMessageRegExp($regularExpression); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.