3
3
namespace spec \Http \Message \RequestMatcher ;
4
4
5
5
use Http \Message \RequestMatcher ;
6
- use PhpSpec \ObjectBehavior ;
7
6
use Psr \Http \Message \RequestInterface ;
8
7
use Psr \Http \Message \UriInterface ;
8
+ use PhpSpec \ObjectBehavior ;
9
9
10
10
class RegexRequestMatcherSpec extends ObjectBehavior
11
11
{
@@ -14,17 +14,17 @@ function let($regex)
14
14
$ this ->beConstructedWith ($ regex );
15
15
}
16
16
17
- function it_is_a_request_matcher ()
17
+ function it_is_initializable ()
18
18
{
19
- $ this ->shouldImplement ('Http\Message\RequestMatcher ' );
19
+ $ this ->shouldHaveType ('Http\Message\RequestMatcher\RegexRequestMatcher ' );
20
20
}
21
21
22
- function it_is_initializable ()
22
+ function it_is_a_request_matcher ()
23
23
{
24
- $ this ->shouldHaveType ('Http\Message\RequestMatcher\RegexRequestMatcher ' );
24
+ $ this ->shouldImplement ('Http\Message\RequestMatcher ' );
25
25
}
26
26
27
- function it_matches (RequestInterface $ request , UriInterface $ uri )
27
+ function it_matches_a_request (RequestInterface $ request , UriInterface $ uri )
28
28
{
29
29
$ this ->beConstructedWith ('/test/ ' );
30
30
@@ -34,7 +34,7 @@ function it_matches(RequestInterface $request, UriInterface $uri)
34
34
$ this ->matches ($ request )->shouldReturn (true );
35
35
}
36
36
37
- function it_does_not_match (RequestInterface $ request , UriInterface $ uri )
37
+ function it_does_not_match_a_request (RequestInterface $ request , UriInterface $ uri )
38
38
{
39
39
$ this ->beConstructedWith ('/test/ ' );
40
40
0 commit comments