@mallory_cormier
To test a Laravel pipeline, you can follow these steps:
1
|
php artisan make:test PipelineTest |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
use TestsTestCase; use AppPipelinesExamplePipeline; class PipelineTest extends TestCase { public function test_pipeline_returns_correct_data() { $data = []; $pipeline = app(ExamplePipeline::class); $result = $pipeline->send($data) ->through([ // Add your pipeline stages here ]) ->thenReturn(); $this->assertEquals($expectedResult, $result); } } |
1
|
vendor/bin/phpunit |
By following these steps, you can effectively test your Laravel pipeline to ensure that it functions correctly.