Changed bootable interface to inherit so mock can work on PHPUnit 9.
This commit is contained in:
1 parent
6be80cc832
commit
f4f659c95a
3 files changed
+6
-3
No files matched your search
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
- `Bootable_Provider_Interface` to extend `ServiceProviderInterface`, so that it can be mocked in PHPUnit 9
|
||||
|
||||
### Fixed
|
||||
- Mustache.php version to resolve issues on PHP 7.4
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@ declare( strict_types=1 );
|
||||
|
||||
namespace Rarst\Laps\Provider;
|
||||
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use Rarst\Laps\Plugin;
|
||||
|
||||
/**
|
||||
* Interface for providers that need to boot up once plugin is ready to start.
|
||||
*/
|
||||
interface Bootable_Provider_Interface {
|
||||
interface Bootable_Provider_Interface extends ServiceProviderInterface {
|
||||
|
||||
/**
|
||||
* @param Plugin $laps Container instance.
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Rarst\Laps\Tests;
|
||||
|
||||
use Brain\Monkey\Functions;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use Rarst\Laps\Provider\Bootable_Provider_Interface;
|
||||
|
||||
class PluginTest extends LapsTestCase {
|
||||
@@ -12,7 +11,7 @@ class PluginTest extends LapsTestCase {
|
||||
|
||||
$container = new \Rarst\Laps\Plugin();
|
||||
|
||||
$service = $this->getMockBuilder( [ ServiceProviderInterface::class, Bootable_Provider_Interface::class ] )
|
||||
$service = $this->getMockBuilder( Bootable_Provider_Interface::class )
|
||||
->getMock();
|
||||
|
||||
$service->expects( $this->once() )
|
||||
|
||||
Reference in new issue
Block a user