CompressionAwareTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testDefaultCompressionIs() 0 5 1
A testSetCompression() 0 6 1
1
<?php
2
/**
3
 * This file is part of graze/data-file
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/data-file/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/data-file
12
 */
13
14
namespace Graze\DataFile\Test\Unit\Modify\Compress;
15
16
use Graze\DataFile\Modify\Compress\CompressionFactory;
17
use Graze\DataFile\Modify\Compress\Gzip;
18
use Graze\DataFile\Test\Modify\Compress\FakeCompressionAware;
19
use Graze\DataFile\Test\TestCase;
20
21
class CompressionAwareTest extends TestCase
22
{
23
    public function testDefaultCompressionIs()
24
    {
25
        $trait = new FakeCompressionAware();
26
        static::assertEquals(CompressionFactory::TYPE_NONE, $trait->getCompression());
27
    }
28
29
    public function testSetCompression()
30
    {
31
        $trait = new FakeCompressionAware();
32
        static::assertSame($trait, $trait->setCompression(Gzip::NAME));
33
        static::assertEquals(Gzip::NAME, $trait->getCompression());
34
    }
35
}
36