blob: b4758e72a7fc3f9081647c19414f6560facddd63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 );
}
}
|