File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ public function provideDependencies(Container $container): void
5858 $ this ->loggerFacade = $ loggerFacade ;
5959
6060 return $ this ->createDecorator ();
61- });
61+ }, $ this ->configuration ()->getWeight ()
62+ );
6263 }
6364
6465 protected function createDecorator (): HttpFacadeInterface
Original file line number Diff line number Diff line change 1212namespace Micro \Plugin \Http \Test \Unit ;
1313
1414use Micro \Component \DependencyInjection \Container ;
15+ use Micro \Framework \Kernel \Configuration \DefaultApplicationConfiguration ;
1516use Micro \Framework \Kernel \Plugin \DependencyProviderInterface ;
1617use Micro \Plugin \Http \HttpCorePlugin ;
1718use Micro \Plugin \Http \HttpLoggerPlugin ;
19+ use Micro \Plugin \Http \HttpLoggerPluginConfiguration ;
1820use Micro \Plugin \Logger \LoggerPlugin ;
1921use PHPUnit \Framework \TestCase ;
2022
@@ -25,6 +27,9 @@ class HttpLoggerPluginTest extends TestCase
2527 protected function setUp (): void
2628 {
2729 $ this ->plugin = new HttpLoggerPlugin ();
30+ $ this ->plugin ->setConfiguration (new HttpLoggerPluginConfiguration (
31+ new DefaultApplicationConfiguration ([])
32+ ));
2833 }
2934
3035 public function testGetDependedPlugins ()
@@ -46,7 +51,8 @@ public function testProvideDependencies()
4651 $ container = $ this ->createMock (Container::class);
4752 $ container
4853 ->expects ($ this ->once ())
49- ->method ('decorate ' );
54+ ->method ('decorate ' )
55+ ;
5056
5157 $ this ->plugin ->provideDependencies ($ container );
5258 }
Original file line number Diff line number Diff line change 1515
1616use Micro \Component \DependencyInjection \Container ;
1717use Micro \Framework \Kernel \Plugin \DependencyProviderInterface ;
18+ use Micro \Framework \Kernel \Plugin \PluginConfigurationTrait ;
1819use Micro \Framework \Kernel \Plugin \PluginDependedInterface ;
1920use Micro \Plugin \Http \HttpCorePlugin ;
2021use Micro \Plugin \Logger \LoggerPlugin ;
2425 */
2526class TestHtpLoggerPlugin implements DependencyProviderInterface, PluginDependedInterface
2627{
28+ use PluginConfigurationTrait;
29+
2730 public function provideDependencies (Container $ container ): void
2831 {
29- // TODO: Implement provideDependencies() method.
3032 }
3133
3234 public function getDependedPlugins (): iterable
You can’t perform that action at this time.
0 commit comments