Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from Hexanet/1-configurator-spec
Browse files Browse the repository at this point in the history
Add spec for Configurator
  • Loading branch information
nclsHart authored Oct 11, 2017
2 parents 7909bb2 + 00d1348 commit d6538a3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions spec/Configurator/StatsdProcessorConfiguratorSpec.php
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([]);
}
}

0 comments on commit d6538a3

Please sign in to comment.