Created
September 7, 2015 07:31
-
-
Save ciaranmcnulty/63d9820feb05f98f3786 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 | |
class NamedSpec extends ObjectBehavior | |
{ | |
function it_exposes_the_name_it_is_constructed_with() | |
{ | |
$this->beConstructedNamed('Foo'); | |
$this->getName()->shouldReturn('Foo'); | |
} | |
function it_cannot_be_constructed_with_an_empty_name() | |
{ | |
$this->beConstructedNamed(''); | |
$this->shouldThrow(\InvalidArgumentException::class)->duringInstantiation(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment