diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Services/SharedServicesContainerTest.php')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Services/SharedServicesContainerTest.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Services/SharedServicesContainerTest.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Services/SharedServicesContainerTest.php new file mode 100644 index 00000000..b4758e72 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Services/SharedServicesContainerTest.php @@ -0,0 +1,44 @@ +<?php + +namespace SMW\Tests\Services; + +use SMW\Services\SharedServicesContainer; + +/** + * @covers \SMW\Services\SharedServicesContainer + * @group semantic-mediawiki + * + * @license GNU GPL v2+ + * @since 2.3 + * + * @author mwjames + */ +class SharedServicesContainerTest extends \PHPUnit_Framework_TestCase { + + public function testCanConstruct() { + + $this->assertInstanceOf( + SharedServicesContainer::class, + new SharedServicesContainer() + ); + + $this->assertInstanceOf( + '\Onoi\CallbackContainer\CallbackContainer', + new SharedServicesContainer() + ); + } + + public function testRegister() { + + $containerBuilder = $this->getMockBuilder( '\Onoi\CallbackContainer\ContainerBuilder' ) + ->disableOriginalConstructor() + ->getMock(); + + $containerBuilder->expects( $this->atLeastOnce() ) + ->method( 'registerCallback' ); + + $instance = new SharedServicesContainer(); + $instance->register( $containerBuilder ); + } + +} |