@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace spec\PhpSpec\Runner; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | - |
|
| 8 | 6 | use PhpSpec\Formatter\Presenter\PresenterInterface; |
| 9 | 7 | use PhpSpec\Matcher\MatcherInterface; |
| 10 | 8 | |
@@ -4,9 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | 6 | use Prophecy\Argument; |
| 7 | - |
|
| 8 | 7 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
| 9 | - |
|
| 10 | 8 | use PhpSpec\Runner\ExampleRunner; |
| 11 | 9 | use PhpSpec\Loader\Node\SpecificationNode; |
| 12 | 10 | use PhpSpec\Loader\Node\ExampleNode; |
@@ -4,13 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | 6 | use Prophecy\Argument; |
| 7 | - |
|
| 8 | 7 | use PhpSpec\Event\ExampleEvent; |
| 9 | 8 | use PhpSpec\Exception\Example\StopOnFailureException; |
| 10 | 9 | use PhpSpec\Loader\Suite; |
| 11 | 10 | use PhpSpec\Loader\Node\SpecificationNode; |
| 12 | 11 | use PhpSpec\Runner\SpecificationRunner; |
| 13 | - |
|
| 14 | 12 | use Symfony\Component\EventDispatcher\EventDispatcher; |
| 15 | 13 | |
| 16 | 14 | class SuiteRunnerSpec extends ObjectBehavior |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | class SuiteRunnerSpec extends ObjectBehavior |
| 17 | 17 | { |
| 18 | 18 | function let(EventDispatcher $dispatcher, SpecificationRunner $specRunner, Suite $suite, |
| 19 | - SpecificationNode $spec1, SpecificationNode $spec2) |
|
| 19 | + SpecificationNode $spec1, SpecificationNode $spec2) |
|
| 20 | 20 | { |
| 21 | 21 | $this->beConstructedWith($dispatcher, $specRunner); |
| 22 | 22 | $suite->getSpecifications()->willReturn( array($spec1, $spec2)); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | SpecificationNode $spec1, SpecificationNode $spec2) |
| 20 | 20 | { |
| 21 | 21 | $this->beConstructedWith($dispatcher, $specRunner); |
| 22 | - $suite->getSpecifications()->willReturn( array($spec1, $spec2)); |
|
| 22 | + $suite->getSpecifications()->willReturn(array($spec1, $spec2)); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | function it_runs_all_specs_in_the_suite_through_the_specrunner($suite, $specRunner, $spec1, $spec2) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | function it_dispatches_afterSuite_event_with_result_and_time($suite, $specRunner, $dispatcher) |
| 80 | 80 | { |
| 81 | - $specRunner->run(Argument::any())->will(function () { |
|
| 81 | + $specRunner->run(Argument::any())->will(function() { |
|
| 82 | 82 | // Wait a few microseconds to ensure that the spec passes even on fast machines |
| 83 | 83 | usleep(10); |
| 84 | 84 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $dispatcher->dispatch('afterSuite', |
| 91 | 91 | Argument::that( |
| 92 | - function ($event) { |
|
| 92 | + function($event) { |
|
| 93 | 93 | return ($event->getTime() > 0) |
| 94 | 94 | && ($event->getResult() == ExampleEvent::FAILED); |
| 95 | 95 | } |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace spec\PhpSpec\Util; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | 6 | |
| 8 | 7 | class ClassFileAnalyserSpec extends ObjectBehavior |
| 9 | 8 | { |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | function it_should_return_the_line_number_of_the_end_of_the_last_method() |
| 35 | 35 | { |
| 36 | - $class = $this->getSingleMethodClassContainingAnonymousFunction(); |
|
| 37 | - $this->getEndLineOfLastMethod($class)->shouldReturn(12); |
|
| 36 | + $class = $this->getSingleMethodClassContainingAnonymousFunction(); |
|
| 37 | + $this->getEndLineOfLastMethod($class)->shouldReturn(12); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | private function getSingleMethodClass() |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | private function getSingleMethodClassContainingAnonymousFunction() |
| 74 | 74 | { |
| 75 | - return <<<SINGLE_METHOD_CLASS_CONTAINING_ANONYMOUS_FUNCTION |
|
| 75 | + return <<<SINGLE_METHOD_CLASS_CONTAINING_ANONYMOUS_FUNCTION |
|
| 76 | 76 | <?php |
| 77 | 77 | |
| 78 | 78 | namespace MyNamespace; |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace spec\PhpSpec\Util; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | 6 | |
| 8 | 7 | class InstantiatorSpec extends ObjectBehavior |
| 9 | 8 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use PhpSpec\Exception\Example\SkippingException; |
| 6 | 6 | use PhpSpec\ObjectBehavior; |
| 7 | -use Prophecy\Argument; |
|
| 8 | 7 | |
| 9 | 8 | class MethodAnalyserSpec extends ObjectBehavior |
| 10 | 9 | { |
@@ -7,11 +7,8 @@ |
||
| 7 | 7 | use PhpSpec\Wrapper\Subject\WrappedObject; |
| 8 | 8 | use PhpSpec\Wrapper\Wrapper; |
| 9 | 9 | use PhpSpec\Wrapper\Subject; |
| 10 | - |
|
| 11 | 10 | use PhpSpec\Loader\Node\ExampleNode; |
| 12 | - |
|
| 13 | 11 | use Symfony\Component\EventDispatcher\EventDispatcherInterface as Dispatcher; |
| 14 | - |
|
| 15 | 12 | use PhpSpec\ObjectBehavior; |
| 16 | 13 | use Prophecy\Argument; |
| 17 | 14 | |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | class CallerSpec extends ObjectBehavior |
| 19 | 19 | { |
| 20 | 20 | function let(WrappedObject $wrappedObject, ExampleNode $example, Dispatcher $dispatcher, |
| 21 | - ExceptionFactory $exceptions, Wrapper $wrapper, AccessInspectorInterface $accessInspector) |
|
| 21 | + ExceptionFactory $exceptions, Wrapper $wrapper, AccessInspectorInterface $accessInspector) |
|
| 22 | 22 | { |
| 23 | 23 | $this->beConstructedWith($wrappedObject, $example, $dispatcher, |
| 24 | 24 | $exceptions, $wrapper, $accessInspector); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | function it_dispatches_method_call_events(Dispatcher $dispatcher, WrappedObject $wrappedObject, |
| 28 | - AccessInspectorInterface $accessInspector) |
|
| 28 | + AccessInspectorInterface $accessInspector) |
|
| 29 | 29 | { |
| 30 | 30 | $wrappedObject->isInstantiated()->willReturn(true); |
| 31 | 31 | $wrappedObject->getInstance()->willReturn(new \ArrayObject()); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | function it_sets_a_property_on_the_wrapped_object(WrappedObject $wrappedObject, |
| 49 | - AccessInspectorInterface $accessInspector) |
|
| 49 | + AccessInspectorInterface $accessInspector) |
|
| 50 | 50 | { |
| 51 | 51 | $obj = new \stdClass(); |
| 52 | 52 | $obj->id = 1; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | function it_proxies_method_calls_to_wrapped_object(\ArrayObject $obj, WrappedObject $wrappedObject, |
| 65 | - AccessInspectorInterface $accessInspector) |
|
| 65 | + AccessInspectorInterface $accessInspector) |
|
| 66 | 66 | { |
| 67 | 67 | $obj->asort()->shouldBeCalled(); |
| 68 | 68 | |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | 6 | use PhpSpec\Wrapper\Subject; |
| 7 | 7 | use PhpSpec\Wrapper\Subject\WrappedObject; |
| 8 | -use Prophecy\Argument; |
|
| 9 | - |
|
| 10 | 8 | use PhpSpec\Wrapper\Subject\Expectation\ExpectationInterface; |
| 11 | 9 | |
| 12 | 10 | class ConstructorDecoratorSpec extends ObjectBehavior |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace spec\PhpSpec\Wrapper\Subject\Expectation; |
| 4 | 4 | |
| 5 | 5 | use PhpSpec\ObjectBehavior; |
| 6 | -use Prophecy\Argument; |
|
| 7 | - |
|
| 8 | 6 | use PhpSpec\Wrapper\Subject\Expectation\Decorator as AbstractDecorator; |
| 9 | 7 | use PhpSpec\Wrapper\Subject\Expectation\ExpectationInterface; |
| 10 | 8 | |