benjamincrozat's avatar

press() method generates a dd() in integration test

Hello,

I'm trying to run a very basic test where a contributor can edit an article. The problem is that the press() method generates a dd() of the request. This problem only occurs in my ArticlesControllerTest.php.

/** @test */
public function it_allows_contributors_to_edit_articles()
{
    $contributor = $this->createContributor();

    $article = $this->createArticle();

    $this->actingAs($contributor)
        ->visitRoute('articles.edit', $article->slug)
        ->type('Lorem ipsum dolor sit amet', 'title')
        ->press(trans('text.edit-article'))
        ->see(trans('text.resource-edited'));
}

Edit: After further investigation, this part in ArticlesController.php is dd(), even in the browser.

if (!$updated) {
    return back()->withErrors(trans('text.resource-not-updated'));
}
0 likes
1 reply
benjamincrozat's avatar
benjamincrozat
OP
Best Answer
Level 4

Found out it was totally my fault. Some dd() left in the code.

Please or to participate in this conversation.