Added container test.
This commit is contained in:
1 parent
56e9447dce
commit
624e282905
1 file changed
+29
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Rarst\Laps\Tests;
|
||||
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use Rarst\Laps\Provider\Bootable_Provider_Interface;
|
||||
|
||||
class PluginTest extends LapsTestCase {
|
||||
|
||||
public function testContainer() {
|
||||
|
||||
$container = new \Rarst\Laps\Plugin();
|
||||
|
||||
$service = $this->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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user