Passed
Push — master ( f7cc41...5d3746 )
by Konrad
02:11
created

ConfigTest::testFontSpaceLimitSetterGetter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
/**
4
 * @file This file is part of the PdfParser library.
5
 *
6
 * @author  Konrad Abicht <[email protected]>
7
 * @date    2020-12-15
8
 *
9
 * @license LGPLv3
10
 * @url     <https://github.com/smalot/pdfparser>
11
 *
12
 *  PdfParser is a pdf library written in PHP, extraction oriented.
13
 *  Copyright (C) 2017 - Sébastien MALOT <[email protected]>
14
 *
15
 *  This program is free software: you can redistribute it and/or modify
16
 *  it under the terms of the GNU Lesser General Public License as published by
17
 *  the Free Software Foundation, either version 3 of the License, or
18
 *  (at your option) any later version.
19
 *
20
 *  This program is distributed in the hope that it will be useful,
21
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 *  GNU Lesser General Public License for more details.
24
 *
25
 *  You should have received a copy of the GNU Lesser General Public License
26
 *  along with this program.
27
 *  If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>.
28
 */
29
30
namespace Tests\Smalot\PdfParser\Unit;
31
32
use Smalot\PdfParser\Config;
33
use Tests\Smalot\PdfParser\TestCase;
34
35
class ConfigTest extends TestCase
36
{
37
    protected function setUp()
38
    {
39
        parent::setUp();
40
41
        $this->fixture = new Config();
42
    }
43
44
    /**
45
     * Tests setter and getter for font space limit.
46
     */
47
    public function testFontSpaceLimitSetterGetter()
48
    {
49
        $this->assertEquals(-50, $this->fixture->getFontSpaceLimit());
50
51
        $this->fixture->setFontSpaceLimit(1);
52
        $this->assertEquals(1, $this->fixture->getFontSpaceLimit());
53
    }
54
}
55