-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue: documentacao-e-tarefas/desenvolvimento_e_infra#892 Signed-off-by: Thiago <thiago@lepidus.com.br>
- Loading branch information
1 parent
4944c5a
commit f710038
Showing
2 changed files
with
143 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?php | ||
|
||
namespace ThothClient\GraphQL\Model; | ||
|
||
class Series extends AbstractModel | ||
{ | ||
public const SERIES_TYPE_JOURNAL = 'JOURNAL'; | ||
|
||
public const SERIES_TYPE_BOOK_SERIES = 'BOOK_SERIES'; | ||
|
||
public function getSeriesId(): string | ||
{ | ||
return $this->getData('seriesId'); | ||
} | ||
|
||
public function setSeriesId(string $seriesId): void | ||
{ | ||
$this->setData('seriesId', $seriesId); | ||
} | ||
|
||
public function getSeriesType(): string | ||
{ | ||
return $this->getData('seriesType'); | ||
} | ||
|
||
public function setSeriesType(string $seriesType): void | ||
{ | ||
$this->setData('seriesType', $seriesType); | ||
} | ||
|
||
public function getSeriesName(): string | ||
{ | ||
return $this->getData('seriesName'); | ||
} | ||
|
||
public function setSeriesName(string $seriesName): void | ||
{ | ||
$this->setData('seriesName', $seriesName); | ||
} | ||
|
||
public function getIssnPrint(): string | ||
{ | ||
return $this->getData('issnPrint'); | ||
} | ||
|
||
public function setIssnPrint(string $issnPrint): void | ||
{ | ||
$this->setData('issnPrint', $issnPrint); | ||
} | ||
|
||
public function getIssnDigital(): string | ||
{ | ||
return $this->getData('issnDigital'); | ||
} | ||
|
||
public function setIssnDigital(string $issnDigital): void | ||
{ | ||
$this->setData('issnDigital', $issnDigital); | ||
} | ||
|
||
public function getSeriesUrl(): string | ||
{ | ||
return $this->getData('seriesUrl'); | ||
} | ||
|
||
public function setSeriesUrl(string $seriesUrl): void | ||
{ | ||
$this->setData('seriesUrl', $seriesUrl); | ||
} | ||
|
||
public function getSeriesDescription(): string | ||
{ | ||
return $this->getData('seriesDescription'); | ||
} | ||
|
||
public function setSeriesDescription(string $seriesDescription): void | ||
{ | ||
$this->setData('seriesDescription', $seriesDescription); | ||
} | ||
|
||
public function getSeriesCfpUrl(): string | ||
{ | ||
return $this->getData('seriesCfpUrl'); | ||
} | ||
|
||
public function setSeriesCfpUrl(string $seriesCfpUrl): void | ||
{ | ||
$this->setData('seriesCfpUrl', $seriesCfpUrl); | ||
} | ||
|
||
public function getImprintId(): string | ||
{ | ||
return $this->getData('imprintId'); | ||
} | ||
|
||
public function setImprintId(string $imprintId): void | ||
{ | ||
$this->setData('imprintId', $imprintId); | ||
} | ||
} |
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,43 @@ | ||
<?php | ||
|
||
namespace ThothClient\Tests\GraphQL\Model; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use ThothClient\GraphQL\Model\Series; | ||
|
||
final class SeriesTest extends TestCase | ||
{ | ||
public function testGettersAndSetters(): void | ||
{ | ||
$seriesId = '90f5e4ec-e591-4bd9-b06b-506670cb523e'; | ||
$seriesType = Series::SERIES_TYPE_JOURNAL; | ||
$seriesName = 'Foobar'; | ||
$issnPrint = '2515-0758'; | ||
$issnDigital = '2515-0766'; | ||
$seriesUrl = 'http://foo.bar/'; | ||
$seriesDescription = 'Sed nunc dui, semper eu semper vel, bibendum in nulla.'; | ||
$seriesCfpUrl = 'http://foo.bar/baz/cfp'; | ||
$imprintId = 'c2a4eca1-9bb4-479f-98ad-09abc9756745'; | ||
|
||
$series = new Series(); | ||
$series->setSeriesId($seriesId); | ||
$series->setSeriesType($seriesType); | ||
$series->setSeriesName($seriesName); | ||
$series->setIssnPrint($issnPrint); | ||
$series->setIssnDigital($issnDigital); | ||
$series->setSeriesUrl($seriesUrl); | ||
$series->setSeriesDescription($seriesDescription); | ||
$series->setSeriesCfpUrl($seriesCfpUrl); | ||
$series->setImprintId($imprintId); | ||
|
||
$this->assertSame($seriesId, $series->getSeriesId()); | ||
$this->assertSame($seriesType, $series->getSeriesType()); | ||
$this->assertSame($seriesName, $series->getSeriesName()); | ||
$this->assertSame($issnPrint, $series->getIssnPrint()); | ||
$this->assertSame($issnDigital, $series->getIssnDigital()); | ||
$this->assertSame($seriesUrl, $series->getSeriesUrl()); | ||
$this->assertSame($seriesDescription, $series->getSeriesDescription()); | ||
$this->assertSame($seriesCfpUrl, $series->getSeriesCfpUrl()); | ||
$this->assertSame($imprintId, $series->getImprintId()); | ||
} | ||
} |