Created
March 8, 2014 04:31
-
-
Save iakio/9425389 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace spec; | |
use PhpSpec\ObjectBehavior; | |
use Prophecy\Argument; | |
class ExampleSpec extends ObjectBehavior | |
{ | |
function let(\StdClass $obj1, \StdClass $obj2) | |
{ | |
$obj1->name = "One"; | |
$obj2->name = "Two"; | |
$this->obj1 = $obj1; | |
$this->obj2 = $obj2; | |
} | |
function it_have_obj1(\StdClass $obj1) | |
{ | |
$this->obj1->shouldBe($obj1); | |
$this->obj1->name->shouldBe("One"); | |
} | |
function it_have_obj2(\StdClass $obj2) | |
{ | |
$this->obj2->shouldBe($obj2); | |
$this->obj2->name->shouldBe("Two"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment