Passed
Push — master ( 3d4557...4c2a8d )
by Hannes
01:54
created

ProcessRunnerSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\hanneskod\readmetester\Runner;
6
7
use hanneskod\readmetester\Runner\ProcessRunner;
8
use hanneskod\readmetester\Runner\VoidOutcome;
9
use hanneskod\readmetester\Example\ExampleStoreInterface;
10
use PhpSpec\ObjectBehavior;
11
use Prophecy\Argument;
12
13
class ProcessRunnerSpec extends ObjectBehavior
14
{
15
    use RunnerSpecTrait;
16
17
    function it_is_initializable()
18
    {
19
        $this->shouldHaveType(ProcessRunner::class);
20
    }
21
22
    function it_runs_examples_in_isolation(ExampleStoreInterface $store)
23
    {
24
        $store->getExamples()->willReturn([$this->an_example('class Foo {}')]);
25
26
        $this->run($store)->shouldReturnOutcomeInstancesOf([VoidOutcome::class]);
27
28
        // Creating the class a second time should not blow up
29
        $this->run($store)->shouldReturnOutcomeInstancesOf([VoidOutcome::class]);
30
    }
31
}
32