Skip to content

Commit

Permalink
test: add ContactCrudControllerTest for index page validation
Browse files Browse the repository at this point in the history
  • Loading branch information
idmarinas committed Jan 27, 2025
1 parent d5ad5ff commit 276ad09
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tests/Controller/Admin/ContactCrudControllerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* Copyright 2025 (C) IDMarinas - All Rights Reserved
*
* Last modified by "IDMarinas" on 27/01/2025, 20:55
*
* @project IDMarinas Common Bundle
* @see https://github.com/idmarinas/common-bundle
*
* @file ContactCrudControllerTest.php
* @date 27/01/2025
* @time 18:45
*
* @author Iván Diaz Marinas (IDMarinas)
* @license BSD 3-Clause License
*
* @since 3.4.0
*/

namespace Idm\Bundle\Common\Tests\Controller\Admin;

use App\Controller\Admin\ContactCrudController;
use App\Controller\Admin\DashboardController;
use EasyCorp\Bundle\EasyAdminBundle\Test\AbstractCrudTestCase;

class ContactCrudControllerTest extends AbstractCrudTestCase
{
public function testIndexPage ()
{
$this->client->request('GET', $this->generateIndexUrl());

$this->assertResponseIsSuccessful();

var_dump($this->client->getResponse()->getContent());
}

protected function getControllerFqcn (): string
{
return ContactCrudController::class;
}

protected function getDashboardFqcn (): string
{
return DashboardController::class;
}
}

0 comments on commit 276ad09

Please sign in to comment.