Skip to content

Commit

Permalink
Merge branch 'DynamoGeek-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mmonkey committed Dec 4, 2017
2 parents 82b5746 + 2ea2bbf commit 77d1873
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
42 changes: 42 additions & 0 deletions src/Models/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ class Set extends Model
*/
private $standardLegal;

/**
* @var boolean
*/
private $expandedLegal;

/**
* @var string
*/
Expand All @@ -50,6 +55,11 @@ class Set extends Model
*/
private $symbolUrl;

/**
* @var string
*/
private $logoUrl;

/**
* @return string
*/
Expand Down Expand Up @@ -146,6 +156,22 @@ public function setStandardLegal($standardLegal)
$this->standardLegal = $standardLegal;
}

/**
* @return boolean
*/
public function isExpandedLegal()
{
return (boolean)$this->expandedLegal;
}

/**
* @param boolean $expandedLegal
*/
public function setExpandedLegal($expandedLegal)
{
$this->expandedLegal = $expandedLegal;
}

/**
* @return string
*/
Expand Down Expand Up @@ -178,4 +204,20 @@ public function setSymbolUrl($symbolUrl)
$this->symbolUrl = $symbolUrl;
}

/**
* @return string
*/
public function getLogoUrl()
{
return (string)$this->logoUrl;
}

/**
* @param string $logoUrl
*/
public function setLogoUrl($logoUrl)
{
$this->logoUrl = $logoUrl;
}

}
2 changes: 2 additions & 0 deletions tests/SetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ public function testFindReturnOneSet()
$this->assertEquals('XY', $set->getSeries());
$this->assertEquals(115, $set->getTotalCards());
$this->assertEquals(true, $set->isStandardLegal());
$this->assertEquals(true, $set->isExpandedLegal());
$this->assertEquals('02/22/2016', $set->getReleaseDate());
$this->assertEquals('https://images.pokemontcg.io/g1/symbol.png', $set->getSymbolUrl());
$this->assertEquals('https://images.pokemontcg.io/g1/logo.png', $set->getLogoUrl());
}

/**
Expand Down
4 changes: 3 additions & 1 deletion tests/lib/fixtures/sets/find.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"series": "XY",
"totalCards": 115,
"standardLegal": true,
"expandedLegal": true,
"releaseDate": "02/22/2016",
"symbolUrl": "https://images.pokemontcg.io/g1/symbol.png"
"symbolUrl": "https://images.pokemontcg.io/g1/symbol.png",
"logoUrl": "https://images.pokemontcg.io/g1/logo.png"
}
}

0 comments on commit 77d1873

Please sign in to comment.