summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/ResponseServiceProviderTest.php
blob: 52e95714e2965d5406a83611e23cd9b12a9f83b3 (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
<?php

namespace Engelsystem\Test\Unit\Http;

use Engelsystem\Http\Response;
use Engelsystem\Http\ResponseServiceProvider;
use Engelsystem\Test\Unit\ServiceProviderTest;
use PHPUnit_Framework_MockObject_MockObject as MockObject;

class ResponseServiceProviderTest extends ServiceProviderTest
{
    /**
     * @covers \Engelsystem\Http\ResponseServiceProvider::register()
     */
    public function testRegister()
    {
        /** @var MockObject|Response $response */
        $response = $this->getMockBuilder(Response::class)
            ->getMock();

        $app = $this->getApp();

        $this->setExpects($app, 'make', [Response::class], $response);
        $this->setExpects($app, 'instance', ['response', $response]);

        $serviceProvider = new ResponseServiceProvider($app);
        $serviceProvider->register();
    }
}