Added container test.

This commit is contained in:
Andrey Savchenko committed 2018-02-22 12:34:47 +02:00
1 parent 56e9447dce
commit 624e282905
1 file changed
+29
+29
View File
@@ -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();
}
}