aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeorgy Redkozubov <georgy.redkozubov@linaro.org>2012-06-11 14:44:16 +0400
committerGeorgy Redkozubov <georgy.redkozubov@linaro.org>2012-06-11 14:44:16 +0400
commit102ae4d0454935e1f87d9fc2e3c7d2ebdbc87aba (patch)
treed427c6af0ee7fefb0c96d94d1fb620015034983d /tests
parent26a1a9e092db5f7638a2d23b0d7173873d8fce58 (diff)
Refactored 'getX' methods into single 'get' method. Updated code to use new approach.
Diffstat (limited to 'tests')
-rw-r--r--tests/BuildInfoTest.php95
1 files changed, 3 insertions, 92 deletions
diff --git a/tests/BuildInfoTest.php b/tests/BuildInfoTest.php
index 93cb130..14f9dc8 100644
--- a/tests/BuildInfoTest.php
+++ b/tests/BuildInfoTest.php
@@ -9,8 +9,6 @@ class BuildInfoTest extends PHPUnit_Framework_TestCase
private $good_bi;
private $empty_bi;
private $fname;
- private $lic_text_test =
- '<p>IMPORTANT — PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY.</p>';
public function setUp()
{
@@ -228,106 +226,19 @@ class BuildInfoTest extends PHPUnit_Framework_TestCase
public function test_getBuildName_empty()
{
- $this->assertFalse($this->empty_bi->getBuildName($this->fname));
+ $this->assertFalse($this->empty_bi->get("Build-Name"));
}
public function test_getBuildName_type()
{
$this->assertInternalType(
- 'string', $this->good_bi->getBuildName($this->fname));
+ 'string', $this->good_bi->get("Build-Name"));
}
public function test_getBuildName()
{
$this->assertEquals(
- 'landing-snowball', $this->good_bi->getBuildName($this->fname));
- }
-
- public function test_getTheme_empty()
- {
- $this->assertFalse($this->empty_bi->getTheme($this->fname));
- }
-
- public function test_getTheme_type()
- {
- $this->assertInternalType(
- 'string', $this->good_bi->getTheme($this->fname));
- }
-
- public function test_getTheme()
- {
- $this->assertEquals(
- 'stericsson', $this->good_bi->getTheme($this->fname));
- }
-
- public function test_getLicenseType_empty()
- {
- $this->assertFalse($this->empty_bi->getLicenseType($this->fname));
- }
-
- public function test_getLicenseType_type()
- {
- $this->assertInternalType(
- 'string', $this->good_bi->getLicenseType($this->fname));
- }
-
- public function test_getLicenseType()
- {
- $this->assertEquals(
- 'open', $this->good_bi->getLicenseType($this->fname));
- }
-
- public function test_getCollectUserData_empty()
- {
- $this->assertFalse($this->empty_bi->getCollectUserData($this->fname));
- }
-
- public function test_getCollectUserData_type()
- {
- $this->assertInternalType(
- 'string', $this->good_bi->getCollectUserData($this->fname));
- }
-
- public function test_getCollectUserData()
- {
- $this->assertEquals(
- 'yes', $this->good_bi->getCollectUserData($this->fname));
- }
-
- public function test_getLaunchpadTeams_empty()
- {
- $this->assertFalse($this->empty_bi->getLaunchpadTeams($this->fname));
- }
-
- public function test_getLaunchpadTeams_type()
- {
- $this->assertInternalType(
- 'string', $this->good_bi->getLaunchpadTeams($this->fname));
- }
-
- public function test_getLaunchpadTeams()
- {
- $this->assertEquals(
- 'linaro,non-linaro',
- $this->good_bi->getLaunchpadTeams($this->fname));
- }
-
- public function test_getLicenseText_empty()
- {
- $this->assertFalse($this->empty_bi->getLicenseText($this->fname));
- }
-
- public function test_getLicenseText_type()
- {
- $this->assertInternalType(
- 'string', $this->good_bi->getLicenseText($this->fname));
- }
-
- public function test_getLicenseText()
- {
- $this->assertStringStartsWith(
- $this->lic_text_test,
- $this->good_bi->getLicenseText($this->fname));
+ 'landing-snowball', $this->good_bi->get("Build-Name"));
}
}
?>