Skip to content

Instantly share code, notes, and snippets.

<?php
// how that:
class DescribeContextZend extends \PHPSpec\Context
{
function before() {
$this->controller = $this->spec(new DescribeFooController);
}
<?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"