@@ -18,13 +18,14 @@ public function it_registers_a_blog_post_route()
1818 /** @test */
1919 public function it_returns_a_200_if_the_blog_exists ()
2020 {
21+ $ this ->withoutExceptionHandling ();
2122 File::shouldReceive ('exists ' )
2223 ->once ()
23- ->with ('resources/blogs/published/test.md ' )
24+ ->with (base_path ( 'resources/blogs/published/test.md ' ) )
2425 ->andReturn (true );
2526 File::shouldReceive ('get ' )
2627 ->once ()
27- ->with ('resources/blogs/published/test.md ' )
28+ ->with (base_path ( 'resources/blogs/published/test.md ' ) )
2829 ->andReturn ('test ' );
2930
3031 $ this ->get ('/blog/test ' )->assertOk ();
@@ -33,9 +34,10 @@ public function it_returns_a_200_if_the_blog_exists()
3334 /** @test */
3435 public function it_returns_a_404_if_the_blog_does_not_exist ()
3536 {
37+ $ this ->withoutExceptionHandling ();
3638 File::shouldReceive ('exists ' )
3739 ->once ()
38- ->with ('resources/blogs/published/does-not-exist.md ' )
40+ ->with (base_path ( 'resources/blogs/published/does-not-exist.md ' ) )
3941 ->andReturn (false );
4042
4143 $ this ->get ('/blog/does-not-exist ' )->assertStatus (404 );
@@ -44,13 +46,14 @@ public function it_returns_a_404_if_the_blog_does_not_exist()
4446 /** @test */
4547 public function it_converts_md_to_html ()
4648 {
49+ $ this ->withoutExceptionHandling ();
4750 File::shouldReceive ('exists ' )
4851 ->once ()
49- ->with ('resources/blogs/published/published-post.md ' )
52+ ->with (base_path ( 'resources/blogs/published/published-post.md ' ) )
5053 ->andReturn (true );
5154 File::shouldReceive ('get ' )
5255 ->once ()
53- ->with ('resources/blogs/published/published-post.md ' )
56+ ->with (base_path ( 'resources/blogs/published/published-post.md ' ) )
5457 ->andReturn ('# Hello World! ' );
5558
5659 $ this ->get ('/blog/published-post ' )
0 commit comments