FOSSology  4.4.0
Open Source License Compliance by Open Source Software
AgentRefTest.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2014 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\Lib\Data;
9 
10 class AgentRefTest extends \PHPUnit\Framework\TestCase
11 {
12  private $agentId = 1243;
13  private $agentName = "<agentName>";
14  private $agentRevision = "<agentRevision";
16  private $agentRef;
17 
18  protected function setUp() : void
19  {
20  $this->agentRef = new AgentRef($this->agentId, $this->agentName, $this->agentRevision);
21  }
22 
23  public function testGetAgentId()
24  {
25  assertThat($this->agentRef->getAgentId(), is($this->agentId));
26  }
27 
28  public function testGetAgentName()
29  {
30  assertThat($this->agentRef->getAgentName(), is($this->agentName));
31  }
32 
33  public function testGetAgentRevision()
34  {
35  assertThat($this->agentRef->getAgentRevision(), is($this->agentRevision));
36  }
37 
38  public function testToString()
39  {
40  assertThat(strval($this->agentRef), is("AgentRef(1243, <agentName>, <agentRevision)"));
41  }
42 }