ExecutionWrapperIntegrationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 2
Bugs 2 Features 0
Metric Value
wmc 1
c 2
b 2
f 0
lcom 0
cbo 4
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExecuteSubscriber() 0 10 1
1
<?php
2
namespace ivol\tests;
3
4
use ivol\EventDispatcher\AfterExecuteEvent;
5
use ivol\EventDispatcher\BeforeExecuteEvent;
6
use ivol\ExecutionContext;
7
use ivol\ExecutionWrapper;
8
use ivol\tests\Helper\TimeProfilerSubscriber;
9
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
10
11
class ExecutionWrapperIntegrationTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testExecuteSubscriber()
14
    {
15
        $sut = new ExecutionWrapper();
16
        $profiler = new TimeProfilerSubscriber();
17
        $sut->getEventDispatcher()->addSubscriber($profiler);
18
19
        $sut->exec('echo %s', array("'123'"));
20
21
        $this->assertTrue($profiler->getProfiledTimestamp() > 0);
22
    }
23
}