FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
LicenseTest.php
1 <?php
2 /*
3 Copyright (C) 2014, Siemens AG
4 Authors: Johannes Najjar, Andreas Würl
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 version 2 as published by the Free Software Foundation.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 namespace Fossology\Lib\Data;
21 
22 class LicenseTest extends \PHPUnit\Framework\TestCase
23 {
25  private $text;
27  private $url;
29  private $license;
30 
31  protected function setUp()
32  {
33  $this->text = "The License text";
34  $this->url = "http://www.fossology.org";
35 
36  $this->license = new License(8, "testSN", "testFN", 4, $this->text, $this->url, 1);
37  }
38 
39  public function testText()
40  {
41  assertThat($this->license->getText(), is($this->text));
42  }
43 
44  public function testUrl()
45  {
46  assertThat($this->license->getUrl(), is($this->url));
47  }
48 }
Definition: nomos.h:439