1
|
|
|
<?php |
2
|
|
|
/* Copyright (C) 2016 Michael Giesler |
3
|
|
|
* |
4
|
|
|
* This file is part of Dembelo. |
5
|
|
|
* |
6
|
|
|
* Dembelo is free software: you can redistribute it and/or modify |
7
|
|
|
* it under the terms of the GNU Affero General Public License as published by |
8
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
9
|
|
|
* (at your option) any later version. |
10
|
|
|
* |
11
|
|
|
* Dembelo is distributed in the hope that it will be useful, |
12
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14
|
|
|
* GNU Affero General Public License 3 for more details. |
15
|
|
|
* |
16
|
|
|
* You should have received a copy of the GNU Affero General Public License 3 |
17
|
|
|
* along with Dembelo. If not, see <http://www.gnu.org/licenses/>. |
18
|
|
|
*/ |
19
|
|
|
/** |
20
|
|
|
* @package DembeloMain |
21
|
|
|
*/ |
22
|
|
|
|
23
|
|
|
namespace DembeloMain\Tests\Document; |
24
|
|
|
|
25
|
|
|
use DembeloMain\Document\Importfile; |
26
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Class DocumentTextnodeTest |
30
|
|
|
*/ |
31
|
|
|
class ImportfileTest extends WebTestCase |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* @var Importfile |
35
|
|
|
*/ |
36
|
|
|
private $importfile; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* setUp method |
40
|
|
|
*/ |
41
|
|
|
public function setUp() |
42
|
|
|
{ |
43
|
|
|
$this->importfile = new Importfile(); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* tests (get|set)Id |
48
|
|
|
*/ |
49
|
|
|
public function testId() |
50
|
|
|
{ |
51
|
|
|
$this->assertNull($this->importfile->getId()); |
52
|
|
|
$this->importfile->setId('someId'); |
53
|
|
|
$this->assertEquals('someId', $this->importfile->getId()); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* tests (get|set)Name |
58
|
|
|
*/ |
59
|
|
|
public function testName() |
60
|
|
|
{ |
61
|
|
|
$this->assertNull($this->importfile->getName()); |
62
|
|
|
$this->importfile->setName('someName'); |
63
|
|
|
$this->assertEquals('someName', $this->importfile->getName()); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* tests (get|set)LicenseeId |
68
|
|
|
*/ |
69
|
|
|
public function testLicenseeId() |
70
|
|
|
{ |
71
|
|
|
$this->assertNull($this->importfile->getLicenseeId()); |
72
|
|
|
$this->importfile->setLicenseeId('someLicenseeId'); |
73
|
|
|
$this->assertEquals('someLicenseeId', $this->importfile->getLicenseeId()); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* tests (get|set)Imported |
78
|
|
|
*/ |
79
|
|
|
public function testImported() |
80
|
|
|
{ |
81
|
|
|
$this->assertNull($this->importfile->getImported()); |
82
|
|
|
$this->importfile->setImported(2); |
83
|
|
|
$this->assertEquals(2, $this->importfile->getImported()); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* tests (get|set)Author |
88
|
|
|
*/ |
89
|
|
|
public function testAuthor() |
90
|
|
|
{ |
91
|
|
|
$this->assertNull($this->importfile->getAuthor()); |
92
|
|
|
$this->importfile->setAuthor('someAuthor'); |
93
|
|
|
$this->assertEquals('someAuthor', $this->importfile->getAuthor()); |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* tests (get|set)Publisher |
98
|
|
|
*/ |
99
|
|
|
public function testPublisher() |
100
|
|
|
{ |
101
|
|
|
$this->assertNull($this->importfile->getPublisher()); |
102
|
|
|
$this->importfile->setPublisher('somePublisher'); |
103
|
|
|
$this->assertEquals('somePublisher', $this->importfile->getPublisher()); |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* tests (get|set)Orgname |
108
|
|
|
*/ |
109
|
|
|
public function testOrgname() |
110
|
|
|
{ |
111
|
|
|
$this->assertNull($this->importfile->getOriginalname()); |
112
|
|
|
$this->importfile->setOriginalname('someOrgname'); |
113
|
|
|
$this->assertEquals('someOrgname', $this->importfile->getOriginalname()); |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* tests (get|set)Filename |
118
|
|
|
*/ |
119
|
|
|
public function testFilename() |
120
|
|
|
{ |
121
|
|
|
$this->assertNull($this->importfile->getFilename()); |
122
|
|
|
$this->importfile->setFilename('someFilename'); |
123
|
|
|
$this->assertEquals('someFilename', $this->importfile->getFilename()); |
124
|
|
|
} |
125
|
|
|
} |
126
|
|
|
|