Passed
Push — stable ( 1cb707...85bde5 )
by Nuno
01:47
created

WriterTest::it_gets_the_output()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Tests\Unit;
4
5
use PHPUnit\Framework\TestCase;
6
use Whoops\Exception\Inspector;
7
use NunoMaduro\Collision\Writer;
8
use Whoops\Exception\FrameCollection;
9
use Symfony\Component\Console\Output\ConsoleOutput;
10
use Symfony\Component\Console\Output\BufferedOutput;
11
use NunoMaduro\Collision\Contracts\Writer as WriterContract;
12
13
class WriterTest extends TestCase
14
{
15
    /** @test */
16
    public function it_respects_is_contract(): void
17
    {
18
        $this->assertInstanceOf(WriterContract::class, new Writer());
19
    }
20
21
    /** @test */
22
    public function it_gets_the_output(): void
23
    {
24
        $writer = new Writer($output = new ConsoleOutput());
25
26
        $this->assertEquals($writer->getOutput(), $output);
27
    }
28
29
    /** @test */
30
    public function it_sets_the_output(): void
31
    {
32
        $writer = (new Writer())->setOutput($output = new ConsoleOutput());
33
34
        $this->assertEquals($writer->getOutput(), $output);
35
    }
36
}