Passed
Push — master ( c9493e...51929d )
by Victor
01:45
created

testProcessShouldLogDebugInformationToConsole()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Shoot\Shoot\Tests\Middleware;
5
6
use PHPUnit\Framework\TestCase;
7
use Shoot\Shoot\Context;
8
use Shoot\Shoot\Middleware\InspectorMiddleware;
9
use Shoot\Shoot\Tests\Fixtures\MiddlewareCallback;
10
use Shoot\Shoot\Tests\Fixtures\ProductPresentationModel;
11
use Shoot\Shoot\Tests\Fixtures\ViewFactory;
12
13
final class InspectorMiddlewareTest extends TestCase
14
{
15
    /**
16
     * @return void
17
     */
18
    public function testProcessShouldLogDebugInformationToConsole()
19
    {
20
        $this->expectOutputRegex('/<script>.+<\/script>/');
21
22
        $context = new Context();
23
        $middleware = new InspectorMiddleware();
24
        $next = new MiddlewareCallback();
25
        $presentationModel = new ProductPresentationModel();
26
        $view = ViewFactory::create($presentationModel);
27
28
        $middleware->process($view, $context, $next);
29
    }
30
}
31