Adding A Form To Submit Thread Replies

Adding A Form To Submit Thread Replies

In this tutorial of our forum series, we will create a new form so that users can submit a reply to any given thread. We are going to want to make sure that the form only displays to authenticated users, so we’ll introduce a little bit about how to do auth checking. If the user is a guest, we can provide an option to login if they like.…

Using Test Authentication To Allow Logged In Users To Post Replies

Using Test Authentication To Allow Logged In Users To Post Replies

We’ll keep plugging away at our code in this laravel tutorial and tackle many things. Adding links to user profiles is on the table as is cleaning up our view files by making use of partials. From there we’ll move on to adding support for displaying thread owners backed by tests. We’ll add a new testing class of ParticipateInForumTest to start testing and building the concept of authenticated users adding replies to threads.…

Feature Test vs Unit Test And Adding Replies To Threads

Feature Test vs Unit Test And Adding Replies To Threads

We’re moving along nicely with our test driven development of the forum. In this tutorial we will start tackling the concept of adding replies to threads. We’ll continue with developing the test case first, thinking out the pseudo code, and then adding the actual code to the application to make it all work. We’ll also take a loot at the concept of Feature Tests vs Unit Tests.…

How To Create A Feature Test In Laravel

How To Create A Feature Test In Laravel

Since we are doing test driven development, we need to actually create tests for features before we even build them. In this tutorial, that is exactly what we will do. The first thing, or feature, that our forum project will have is that a user can view threads. We can navigate to the tests folder and rename the boilerplate ExampleTest.php to ThreadsTest.php. Before we do that however, we will need to set up our testing environment, so that will be the first step.…