function it_should_not_call_the_stopwatch_or_logger_when_they_are_not_used($stopwatch, $logger) { $log = new LogOperation(new DeleteOperation('foo')); $this->beConstructedWith(null, null); $logger->debug(Argument::any(), Argument::any())->shouldNotBeCalled(); $stopwatch->start(Argument::any(), Argument::any())->shouldNotBeCalled(); $stopwatch->stop(Argument::any(), Argument::any())->shouldNotBeCalled(); $this->start($log->start()); $this->end($log->stop()); }