Laravel-Testing-Decoded icon indicating copy to clipboard operation
Laravel-Testing-Decoded copied to clipboard

This project is exclusively for reporting typos and errors in the book, "Laravel Testing Decoded."

Results 35 Laravel-Testing-Decoded issues
Sort by recently updated
recently updated
newest added

If you enjoyed the book, and don't mind providing a short testimonial that will be used in various places, leave a comment below. Even a sentence or two would be...

Hi, I couldn't find a more-relevant place to say this, so I just go ahead here. I'm at the middle of reading your book and I've already faced a whole...

Hi Jeffrey, On page 146 you talk about mocking Eloquent and Post classes. On line 8: `$this->mock = Mockery::mock('Eloquent', 'Post');` However running this test returns: `PHP Fatal error: Class 'Eloquent'...

Hi, I encountered the problem with the View::make() syntax. I am using 5.1 of Laravel, but I solved it myself. The problem is: ``` Route::get('posts', function() { $posts = Post::all();...

Hi Jeffrey, You are using the double equal sign to determine the assertTrue on page 26 of your book. $this->assertTrue($greeting == 'Hello, World.', $greeting); In the examples above on page...

Error in `testStoreSuccess()` method on page 141. In line 15 in the codeblock you have: ``` $this->assertRedirectedToRoute('posts.index', ['flash']); ``` But should be: ``` $this->assertRedirectedToRoute('posts.index', [], ['flash']); ```

In chapter 10 under "Redirections" you post the following example: ``` public function testStore() { Input::replace($input = ['title' => 'My Title']); $this->mock ->shouldReceive('create') ->once() ->with($input); $this->app->instance('Post', $this->mock); $this->call('POST', 'posts'); $this->assertRedirectedToRoute('posts.index');...

I am trying to follow the chapter, and everything goes fine until page 109 "Return Values From Mocked Methods". Making the test `testDoesNotOverwriteFile` as described works: ``` public function testItDoesNotOverwrite()...

Minor issue with the Generator class in chapter 8, pages 110-113. Generator is an internal class as of PHP5.5. Running the GeneratorTest results in: 1) GeneratorTest::testItWorks The "Generator" class is...

For those who, like me are brand new to testing and, might end up spending almost an hour trying to figure out why this error (NoMatchingExpectationException: No matching handler) occurs,...