Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed addEvent from the GeneratorInterface, should only be used int…
…ernally.
- Loading branch information
1 parent
fe69665
commit 83363a6
Showing
5 changed files
with
50 additions
and
10 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,22 @@ | ||
<?php | ||
|
||
namespace spec\League\Event\Stub; | ||
|
||
use League\Event\EventInterface; | ||
use PhpSpec\ObjectBehavior; | ||
use Prophecy\Argument; | ||
|
||
class DomainGeneratorSpec extends ObjectBehavior | ||
{ | ||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType('League\Event\Stub\DomainGenerator'); | ||
$this->shouldHaveType('League\Event\GeneratorInterface'); | ||
} | ||
|
||
public function it_should_record_an_event_internally(EventInterface $event) | ||
{ | ||
$this->recordAnEvent($event); | ||
$this->releaseEvents()->shouldReturn([$event]); | ||
} | ||
} |
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
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,17 @@ | ||
<?php | ||
|
||
namespace League\Event\Stub; | ||
|
||
use League\Event\EventInterface; | ||
use League\Event\GeneratorInterface; | ||
use League\Event\GeneratorTrait; | ||
|
||
class DomainGenerator implements GeneratorInterface | ||
{ | ||
use GeneratorTrait; | ||
|
||
public function recordAnEvent(EventInterface $event) | ||
{ | ||
$this->addEvent($event); | ||
} | ||
} |