-
Notifications
You must be signed in to change notification settings - Fork 0
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 #15 from elifesciences/support-php-8.x
Support PHP 8.x
- Loading branch information
Showing
5 changed files
with
76 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/composer.lock | ||
/.php_cs.cache | ||
/vendor/ | ||
/.phpunit.result.cache |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/composer.lock | ||
/.php_cs.cache | ||
/vendor/ | ||
/.phpunit.result.cache |
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,67 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Silex framework. | ||
* | ||
* (c) Fabien Potencier <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace tests\eLife\Logging\Silex; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\HttpKernel\Client; | ||
use Symfony\Component\HttpKernel\HttpKernelInterface; | ||
|
||
echo "booo"; | ||
|
||
/** | ||
* WebTestCase is the base class for functional tests. | ||
* | ||
* @author Igor Wiedler <[email protected]> | ||
*/ | ||
abstract class WebTestCase extends TestCase | ||
{ | ||
/** | ||
* HttpKernelInterface instance. | ||
* | ||
* @var HttpKernelInterface | ||
*/ | ||
protected $app; | ||
|
||
/** | ||
* PHPUnit setUp for setting up the application. | ||
* | ||
* Note: Child classes that define a setUp method must call | ||
* parent::setUp(). | ||
*/ | ||
protected function setUp(): void | ||
{ | ||
$this->app = $this->createApplication(); | ||
} | ||
|
||
/** | ||
* Creates the application. | ||
* | ||
* @return HttpKernelInterface | ||
*/ | ||
abstract public function createApplication(); | ||
|
||
/** | ||
* Creates a Client. | ||
* | ||
* @param array $server Server parameters | ||
* | ||
* @return Client A Client instance | ||
*/ | ||
public function createClient(array $server = []) | ||
{ | ||
if (!class_exists('Symfony\Component\BrowserKit\Client')) { | ||
throw new \LogicException('Component "symfony/browser-kit" is required by WebTestCase.'.PHP_EOL.'Run composer require symfony/browser-kit'); | ||
} | ||
|
||
return new Client($this->app, $server); | ||
} | ||
} |