<?php

namespace spec\Swarrot\Processor\Stack;

use Swarrot\Processor\InitializableInterface;
use Swarrot\Processor\TerminableInterface;
use Swarrot\Processor\ProcessorInterface;
use Swarrot\ParameterBag;
use Swarrot\AMQP\Message;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class StackedProcessorSpec extends ObjectBehavior
{
    function it_is_initializable(InitializableProcessor $p1, TerminableProcessor $p2)
    {
        $this->beConstructedWith(array($p1, $p2));
        $this->shouldHaveType('Swarrot\Processor\Stack\StackedProcessor');
    }
}

class InitializableProcessor implements InitializableInterface {
    public function initialize(ParameterBag $bag) {}
}

class TerminableProcessor implements TerminableInterface {
    public function terminate(ParameterBag $bag) {}
}

<?php

namespace spec\Swarrot\Processor\Stack;

use Swarrot\Processor\InitializableInterface;
use Swarrot\Processor\TerminableInterface;
use Swarrot\Processor\ProcessorInterface;
use Swarrot\ParameterBag;
use Swarrot\AMQP\Message;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class StackedProcessorSpec extends ObjectBehavior
{
    function it_is_initializable(ProcessorInterface $p1, InitializableProcessor $p2, TerminableProcessor $p3)
    {
        $this->beConstructedWith($p1, array($p2, $p3));
        $this->shouldHaveType('Swarrot\Processor\Stack\StackedProcessor');
    }
}

class InitializableProcessor implements InitializableInterface {
    public function initialize(ParameterBag $bag) {}
}

class TerminableProcessor implements TerminableInterface {
    public function terminate(ParameterBag $bag) {}
}

Correct wrong constructor in test
Correct wrong constructor in test
