generated from rich-id/bundle-template
-
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.
- Loading branch information
Dumazeau
committed
Jul 22, 2021
1 parent
368aa72
commit af64040
Showing
6 changed files
with
125 additions
and
3 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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RichId\TermsModuleBundle\Domain\Event; | ||
|
||
use RichId\TermsModuleBundle\Domain\Entity\Terms; | ||
|
||
final class TermsPublishedEvent extends TermsEvent | ||
{ | ||
/** @var Terms */ | ||
private $terms; | ||
|
||
public function __construct(Terms $terms) | ||
{ | ||
$this->terms = $terms; | ||
} | ||
|
||
public function getTerms(): Terms | ||
{ | ||
return $this->terms; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RichId\TermsModuleBundle\Domain\Event; | ||
|
||
use RichId\TermsModuleBundle\Domain\Entity\Terms; | ||
|
||
final class TermsUnpublishedEvent extends TermsEvent | ||
{ | ||
/** @var Terms */ | ||
private $terms; | ||
|
||
public function __construct(Terms $terms) | ||
{ | ||
$this->terms = $terms; | ||
} | ||
|
||
public function getTerms(): Terms | ||
{ | ||
return $this->terms; | ||
} | ||
} |
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RichId\TermsModuleBundle\Tests\Domain\Event; | ||
|
||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestSuite\TestCase\TestCase; | ||
use RichId\TermsModuleBundle\Domain\Entity\Terms; | ||
use RichId\TermsModuleBundle\Domain\Event\TermsPublishedEvent; | ||
|
||
/** | ||
* @covers \RichId\TermsModuleBundle\Domain\Event\TermsPublishedEvent | ||
* @TestConfig("kernel") | ||
*/ | ||
final class TermsPublishedEventTest extends TestCase | ||
{ | ||
public function testEvent(): void | ||
{ | ||
$terms = new Terms(); | ||
$event = new TermsPublishedEvent($terms); | ||
|
||
$this->assertSame($terms, $event->getTerms()); | ||
} | ||
} |
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RichId\TermsModuleBundle\Tests\Domain\Event; | ||
|
||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestSuite\TestCase\TestCase; | ||
use RichId\TermsModuleBundle\Domain\Entity\Terms; | ||
use RichId\TermsModuleBundle\Domain\Event\TermsUnpublishedEvent; | ||
|
||
/** | ||
* @covers \RichId\TermsModuleBundle\Domain\Event\TermsUnpublishedEvent | ||
* @TestConfig("kernel") | ||
*/ | ||
final class TermsUnpublishedEventTest extends TestCase | ||
{ | ||
public function testEvent(): void | ||
{ | ||
$terms = new Terms(); | ||
$event = new TermsUnpublishedEvent($terms); | ||
|
||
$this->assertSame($terms, $event->getTerms()); | ||
} | ||
} |
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