From 624e2829057b0e0064684d0acc4becd565d1ce06 Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Thu, 22 Feb 2018 12:34:47 +0200 Subject: [PATCH] Added container test. --- tests/PluginTest.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/PluginTest.php diff --git a/tests/PluginTest.php b/tests/PluginTest.php new file mode 100644 index 0000000..076472a --- /dev/null +++ b/tests/PluginTest.php @@ -0,0 +1,29 @@ +getMockBuilder( [ ServiceProviderInterface::class, Bootable_Provider_Interface::class ] ) + ->getMock(); + + $service->expects( $this->once() ) + ->method( 'register' ) + ->with( $container ); + + $container->register( $service ); + + $service->expects( $this->once() ) + ->method( 'boot' ) + ->with( $container ); + + $container->run(); + } +}