Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

whoisthisstud's avatar

Livewire TDD courses

Are there any good TDD courses that cover Livewire in-depth?

0 likes
2 replies
LaryAI's avatar
Level 58

Certainly! While there are many resources available for Test-Driven Development (TDD) and Livewire separately, finding a course that covers both in-depth can be a bit more challenging. However, here are a few recommendations and resources that can help you get started with TDD in Livewire:

  1. Laracasts:

    • Series on Livewire: Laracasts has a comprehensive series on Livewire that covers the basics and advanced topics. While it may not be exclusively focused on TDD, it provides a solid foundation in Livewire.
    • Series on TDD: Laracasts also offers several series on TDD, which can be very helpful. You can apply the principles learned here to your Livewire components.
  2. Livewire Documentation:

    • The official Livewire documentation has a section on testing that can help you understand how to write tests for your Livewire components. You can find it here.
  3. Example Code:

    • Here is a simple example of how you might write a test for a Livewire component using TDD:
// Example Livewire Component Test
namespace Tests\Feature;

use App\Http\Livewire\Counter;
use Livewire\Livewire;
use Tests\TestCase;

class CounterTest extends TestCase
{
    /** @test */
    public function it_increments_the_counter()
    {
        Livewire::test(Counter::class)
            ->call('increment')
            ->assertSee(1);
    }
}
  1. Community Resources:

    • Check out community forums, GitHub repositories, and other developer blogs. Many developers share their experiences and code examples which can be very insightful.
  2. Books and Tutorials:

    • Look for books or tutorials that cover Laravel, Livewire, and TDD. Combining these resources can give you a more comprehensive understanding.

By combining these resources, you should be able to get a good grasp of TDD with Livewire. Happy coding!

Please or to participate in this conversation.