EncodingAwareTest::testDefaultEncodingIsBlank()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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\Encoding;
15
16
use Graze\DataFile\Test\Modify\Encoding\FakeEncodingAware;
17
use Graze\DataFile\Test\TestCase;
18
19
class EncodingAwareTest extends TestCase
20
{
21
    public function testDefaultEncodingIsBlank()
22
    {
23
        $encoding = new FakeEncodingAware();
24
        static::assertEquals('', $encoding->getEncoding());
25
    }
26
27
    public function testSetEncoding()
28
    {
29
        $encoding = new FakeEncodingAware();
30
        static::assertSame($encoding, $encoding->setEncoding('UTF-8'));
31
        static::assertEquals('UTF-8', $encoding->getEncoding());
32
    }
33
}
34