mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
API phpunit 9 support
This commit is contained in:
parent
f6e001bf55
commit
05dd7bc0a7
@ -20,12 +20,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"silverstripe/framework": "^4.0",
|
"php": "^7.3 || ^8.0",
|
||||||
|
"silverstripe/framework": "^4.10",
|
||||||
"silverstripe/versioned": "^1.0",
|
"silverstripe/versioned": "^1.0",
|
||||||
"guzzlehttp/guzzle": "^6.3.3"
|
"guzzlehttp/guzzle": "^6.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"sminnee/phpunit": "^5.7",
|
"phpunit/phpunit": "^9.5",
|
||||||
"squizlabs/php_codesniffer": "^3.0"
|
"squizlabs/php_codesniffer": "^3.0"
|
||||||
},
|
},
|
||||||
"extra": [],
|
"extra": [],
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||||
|
|
||||||
|
<testsuites>
|
||||||
<testsuite name="Default">
|
<testsuite name="Default">
|
||||||
<directory>tests</directory>
|
<directory>tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||||
|
@ -10,8 +10,6 @@ use SilverStripe\Security\Member;
|
|||||||
/**
|
/**
|
||||||
* Class DatabaseCheckTest
|
* Class DatabaseCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class DatabaseCheckTest extends SapphireTest
|
class DatabaseCheckTest extends SapphireTest
|
||||||
|
@ -9,8 +9,6 @@ use SilverStripe\EnvironmentCheck\EnvironmentCheck;
|
|||||||
/**
|
/**
|
||||||
* Class ExternalURLCheckTest
|
* Class ExternalURLCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class ExternalURLCheckTest extends SapphireTest
|
class ExternalURLCheckTest extends SapphireTest
|
||||||
|
@ -9,8 +9,6 @@ use SilverStripe\Dev\SapphireTest;
|
|||||||
/**
|
/**
|
||||||
* Class FileWritableCheckTest
|
* Class FileWritableCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class FileWritableCheckTest extends SapphireTest
|
class FileWritableCheckTest extends SapphireTest
|
||||||
|
@ -9,8 +9,6 @@ use SilverStripe\EnvironmentCheck\EnvironmentCheck;
|
|||||||
/**
|
/**
|
||||||
* Class HasClassCheckTest
|
* Class HasClassCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class HasClassCheckTest extends SapphireTest
|
class HasClassCheckTest extends SapphireTest
|
||||||
|
@ -9,8 +9,6 @@ use SilverStripe\Dev\SapphireTest;
|
|||||||
/**
|
/**
|
||||||
* Class HasFunctionCheckTest
|
* Class HasFunctionCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class HasFunctionCheckTest extends SapphireTest
|
class HasFunctionCheckTest extends SapphireTest
|
||||||
|
@ -25,7 +25,7 @@ class SessionCheckTest extends SapphireTest
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->sessionCheck = new SessionCheck('/');
|
$this->sessionCheck = new SessionCheck('/');
|
||||||
|
@ -9,8 +9,6 @@ use SilverStripe\Dev\SapphireTest;
|
|||||||
/**
|
/**
|
||||||
* Class URLCheckTest
|
* Class URLCheckTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class URLCheckTest extends SapphireTest
|
class URLCheckTest extends SapphireTest
|
||||||
|
@ -10,8 +10,6 @@ use SilverStripe\EnvironmentCheck\EnvironmentChecker;
|
|||||||
/**
|
/**
|
||||||
* Class DevCheckControllerTest
|
* Class DevCheckControllerTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class DevCheckControllerTest extends SapphireTest
|
class DevCheckControllerTest extends SapphireTest
|
||||||
|
@ -10,8 +10,6 @@ use SilverStripe\EnvironmentCheck\EnvironmentChecker;
|
|||||||
/**
|
/**
|
||||||
* Class DevHealthControllerTest
|
* Class DevHealthControllerTest
|
||||||
*
|
*
|
||||||
* @mixin PHPUnit_Framework_TestCase
|
|
||||||
*
|
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class DevHealthControllerTest extends SapphireTest
|
class DevHealthControllerTest extends SapphireTest
|
||||||
|
@ -20,7 +20,7 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
protected $usesDatabase = true;
|
protected $usesDatabase = true;
|
||||||
|
|
||||||
protected function tearDown()
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
EnvironmentCheckSuite::reset();
|
EnvironmentCheckSuite::reset();
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
@ -61,8 +61,8 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||||||
$logger->expects($this->once())
|
$logger->expects($this->once())
|
||||||
->method('log')
|
->method('log')
|
||||||
->withConsecutive(
|
->withConsecutive(
|
||||||
$this->equalTo(LogLevel::WARNING),
|
[$this->equalTo(LogLevel::WARNING)],
|
||||||
$this->anything()
|
[$this->anything()]
|
||||||
);
|
);
|
||||||
|
|
||||||
Injector::inst()->registerService($logger, LoggerInterface::class);
|
Injector::inst()->registerService($logger, LoggerInterface::class);
|
||||||
|
Loading…
Reference in New Issue
Block a user