-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added BC property strBadge (strTeamBadge) to Entry/Standing entity
- Loading branch information
Showing
3 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace NklKst\TheSportsDb\BC; | ||
|
||
use Exception; | ||
use JsonMapper; | ||
use NklKst\TheSportsDb\Entity\Table\Entry; | ||
use NklKst\TheSportsDb\Serializer\Table\EntrySerializer; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @coversNothing | ||
*/ | ||
class StandingBcTest extends TestCase | ||
{ | ||
private Entry $entry; | ||
|
||
/** | ||
* @throws Exception | ||
*/ | ||
protected function setUp(): void | ||
{ | ||
$entrySerializer = new EntrySerializer(new JsonMapper()); | ||
|
||
$tableJson = <<<'JSON' | ||
{ | ||
"table": [ | ||
{ | ||
"strBadge": "strTeamBadge" | ||
} | ||
] | ||
} | ||
JSON; | ||
|
||
$this->entry = $entrySerializer->serialize($tableJson)[0]; | ||
} | ||
|
||
/** | ||
* @return array<string[]> | ||
*/ | ||
public static function provideBcProperties(): array | ||
{ | ||
return [ | ||
['strTeamBadge'], | ||
]; | ||
} | ||
|
||
/** | ||
* @dataProvider provideBcProperties | ||
*/ | ||
public function testBcProperties(string $bcProperty): void | ||
{ | ||
BcTestUtils::checkBcProperty($this->entry, $bcProperty); | ||
} | ||
} |