public function testFailureReferenceIsPassedToDelegates()
 {
     $failures = array();
     $context = new Mockery();
     $message = $context->mock('Swift_Mime_Message');
     $t1 = $context->mock('Swift_Transport');
     $con = $context->states('Connection')->startsAs('off');
     $context->checking(Expectations::create()->ignoring($message)->allowing($t1)->isStarted()->returns(false)->when($con->is('off'))->allowing($t1)->isStarted()->returns(true)->when($con->is('on'))->one($t1)->start()->when($con->isNot('on'))->then($con->is('on'))->one($t1)->send($message, reference($failures))->returns(1)->when($con->is('on'))->ignoring($t1));
     $transport = $this->_getTransport(array($t1));
     $transport->start();
     $transport->send($message, $failures);
     $context->assertIsSatisfied();
 }