Skip to content

Instantly share code, notes, and snippets.

@MarcelloDuarte
Created May 19, 2011 13:02
Show Gist options
  • Save MarcelloDuarte/980701 to your computer and use it in GitHub Desktop.
Save MarcelloDuarte/980701 to your computer and use it in GitHub Desktop.
<?php
class DescribeClosedMail extends \PHPSpec\Context {
function itShowsAMailSubjectAndASenderAddress() {
$stubAddress = stub('MailAddress');
$stubAddress->stub('__toString')->andReturn('dummyAddress');
$mail = new ClosedMail('Urgent', $stubAddress);
$this->->spec((string)$mail)->should->be("<tr>\n"
. "<td class=\"subject\">Urgent</td>\n"
. "<td class=\"address\">dummyAddress</td>\n"
. "</tr>");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment