This repository has been archived by the owner on Jan 14, 2019. It is now read-only.
-
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.
Merge pull request #3 from Hexanet/1-configurator-spec
Add spec for Configurator
- Loading branch information
Showing
1 changed file
with
41 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,41 @@ | ||
<?php | ||
|
||
namespace spec\Hexanet\SwarrotStatsdBundle\Configurator; | ||
|
||
use Hexanet\SwarrotStatsdBundle\Configurator\StatsdProcessorConfigurator; | ||
use Hexanet\SwarrotStatsdBundle\Processor\StatsdProcessor; | ||
use PhpSpec\ObjectBehavior; | ||
use Prophecy\Argument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
|
||
class StatsdProcessorConfiguratorSpec extends ObjectBehavior | ||
{ | ||
function let(EventDispatcherInterface $eventDispatcher) | ||
{ | ||
$this->beConstructedWith($eventDispatcher); | ||
} | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(StatsdProcessorConfigurator::class); | ||
} | ||
|
||
function it_returns_processor_arguments($eventDispatcher) | ||
{ | ||
$this->getProcessorArguments([])->shouldReturn([ | ||
StatsdProcessor::class, | ||
$eventDispatcher, | ||
]); | ||
} | ||
|
||
function it_returns_command_options() | ||
{ | ||
$this->getCommandOptions()->shouldReturn([]); | ||
} | ||
|
||
function it_resolves_options(InputInterface $input) | ||
{ | ||
$this->resolveOptions($input)->shouldReturn([]); | ||
} | ||
} |