-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServicesTest.php
43 lines (37 loc) · 1.07 KB
/
ServicesTest.php
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
<?php
/**
* PHP version 5.5
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*
* @copyright Comunidad PHP Puebla 2015 (http://www.comunidadphppuebla.com)
*/
namespace ComPHPPuebla\Slim;
use PHPUnit_Framework_TestCase as TestCase;
use Slim\Slim;
class ServicesTest extends TestCase
{
/** @test */
function it_should_call_its_registered_service_providers()
{
$app = new Slim();
/** @var ServiceProvider $provider1 */
$provider1 = $this->getMock(ServiceProvider::class);
$provider1
->expects($this->once())
->method('configure')
->with($app)
;
/** @var ServiceProvider $provider2 */
$provider2 = $this->getMock(ServiceProvider::class);
$provider2
->expects($this->once())
->method('configure')
->with($app)
;
$services = new Services(new Resolver());
$services->add($provider1);
$services->add($provider2);
$services->configure($app);
}
}