1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @file This file is part of the PdfParser library. |
5
|
|
|
* |
6
|
|
|
* @author Konrad Abicht <[email protected]> |
7
|
|
|
* @date 2020-06-02 |
8
|
|
|
* |
9
|
|
|
* @author Sébastien MALOT <[email protected]> |
10
|
|
|
* @date 2017-01-03 |
11
|
|
|
* |
12
|
|
|
* @license LGPLv3 |
13
|
|
|
* @url <https://github.com/smalot/pdfparser> |
14
|
|
|
* |
15
|
|
|
* PdfParser is a pdf library written in PHP, extraction oriented. |
16
|
|
|
* Copyright (C) 2017 - Sébastien MALOT <[email protected]> |
17
|
|
|
* |
18
|
|
|
* This program is free software: you can redistribute it and/or modify |
19
|
|
|
* it under the terms of the GNU Lesser General Public License as published by |
20
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
21
|
|
|
* (at your option) any later version. |
22
|
|
|
* |
23
|
|
|
* This program is distributed in the hope that it will be useful, |
24
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
25
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26
|
|
|
* GNU Lesser General Public License for more details. |
27
|
|
|
* |
28
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
29
|
|
|
* along with this program. |
30
|
|
|
* If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>. |
31
|
|
|
*/ |
32
|
|
|
|
33
|
|
|
namespace Tests\Smalot\PdfParser\Integration\Element; |
34
|
|
|
|
35
|
|
|
use Smalot\PdfParser\Element\ElementMissing; |
36
|
|
|
use Tests\Smalot\PdfParser\TestCase; |
37
|
|
|
|
38
|
|
|
class ElementMissingTest extends TestCase |
39
|
|
|
{ |
40
|
|
|
public function testEquals() |
41
|
|
|
{ |
42
|
|
|
$element = new ElementMissing(); |
43
|
|
|
$this->assertFalse($element->equals(null)); |
44
|
|
|
$this->assertFalse($element->equals(true)); |
45
|
|
|
$this->assertFalse($element->equals('A')); |
46
|
|
|
$this->assertFalse($element->equals(false)); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function testGetContent() |
50
|
|
|
{ |
51
|
|
|
$element = new ElementMissing(); |
52
|
|
|
$this->assertFalse($element->getContent()); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function testContains() |
56
|
|
|
{ |
57
|
|
|
$element = new ElementMissing(); |
58
|
|
|
$this->assertFalse($element->contains(null)); |
59
|
|
|
$this->assertFalse($element->contains(true)); |
60
|
|
|
$this->assertFalse($element->contains('A')); |
61
|
|
|
$this->assertFalse($element->contains(false)); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function testToString() |
65
|
|
|
{ |
66
|
|
|
$element = new ElementMissing(); |
67
|
|
|
$this->assertEquals('', (string) $element); |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|