33 private $licenseFileId;
45 private $agentRevision;
47 private $licenseMatch;
49 protected function setUp()
52 $this->shortName =
"testSN";
53 $this->fullName =
"testFN";
54 $this->licenseRef =
new LicenseRef($this->
id, $this->shortName, $this->fullName);
57 $this->agentName =
"Monk";
58 $this->agentRevision =
"AgentRev";
59 $this->agentRef =
new AgentRef($this->agentId, $this->agentName, $this->agentRevision);
63 $this->licenseFileId = 12;
65 $this->licenseMatch =
new LicenseMatch($this->fileId, $this->licenseRef, $this->agentRef, $this->licenseFileId, $this->percent);
67 $this->assertCountBefore = \Hamcrest\MatcherAssert::getCount();
70 protected function tearDown()
72 $this->addToAssertionCount(\Hamcrest\MatcherAssert::getCount()-$this->assertCountBefore);
75 public function testGetFileId()
77 assertThat($this->licenseMatch->getFileId(), is($this->fileId));
80 public function testGetLicenseFileId()
82 assertThat($this->licenseMatch->getLicenseFileId(), is($this->licenseFileId));
85 public function testGetLicenseRef()
87 assertThat($this->licenseMatch->getLicenseRef(), is($this->licenseRef));
90 public function testGetAgentRef()
92 assertThat($this->licenseMatch->getAgentRef(), is($this->agentRef));
93 assertThat($this->licenseMatch->getAgentRef(), is(
new AgentRef($this->agentId, $this->agentName, $this->agentRevision)));
96 public function testGetPercent()
98 assertThat($this->licenseMatch->getPercentage(), is($this->percent));
101 public function testGetLicenseId()
103 assertThat($this->licenseMatch->getLicenseId(), equalTo($this->
id));