Changed bootable interface to inherit so mock can work on PHPUnit 9.

This commit is contained in:
Andrey Savchenko committed 2020-02-21 17:19:02 +02:00
1 parent 6be80cc832
commit f4f659c95a
3 files changed
+6 -3

No files matched your search

+3
View File
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased ## Unreleased
### Changed
- `Bootable_Provider_Interface` to extend `ServiceProviderInterface`, so that it can be mocked in PHPUnit 9
### Fixed ### Fixed
- Mustache.php version to resolve issues on PHP 7.4 - Mustache.php version to resolve issues on PHP 7.4
+2 -1
View File
@@ -3,12 +3,13 @@ declare( strict_types=1 );
namespace Rarst\Laps\Provider; namespace Rarst\Laps\Provider;
use Pimple\ServiceProviderInterface;
use Rarst\Laps\Plugin; use Rarst\Laps\Plugin;
/** /**
* Interface for providers that need to boot up once plugin is ready to start. * 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. * @param Plugin $laps Container instance.
+1 -2
View File
@@ -3,7 +3,6 @@
namespace Rarst\Laps\Tests; namespace Rarst\Laps\Tests;
use Brain\Monkey\Functions; use Brain\Monkey\Functions;
use Pimple\ServiceProviderInterface;
use Rarst\Laps\Provider\Bootable_Provider_Interface; use Rarst\Laps\Provider\Bootable_Provider_Interface;
class PluginTest extends LapsTestCase { class PluginTest extends LapsTestCase {
@@ -12,7 +11,7 @@ class PluginTest extends LapsTestCase {
$container = new \Rarst\Laps\Plugin(); $container = new \Rarst\Laps\Plugin();
$service = $this->getMockBuilder( [ ServiceProviderInterface::class, Bootable_Provider_Interface::class ] ) $service = $this->getMockBuilder( Bootable_Provider_Interface::class )
->getMock(); ->getMock();
$service->expects( $this->once() ) $service->expects( $this->once() )