"...web-3-api-platform.git" n'existait pas sur "c278afc0df13b06e882a11caf8682a2e8332394e"
Newer
Older
<?php
namespace App\Tests\Controller;
use App\Controller\HelloController;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class HelloControllerTest extends WebTestCase
{
public function testHelloRandomRoute()
{
$client = static::createClient();
$crawler = $client->request("GET", "/helloRandom");
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertStringContainsString("Hello ", $crawler->filter("h1")->text());
}
function testRandomNameGenerator()
{
$rdName = HelloController::generateRandomName();
$this->assertGreaterThan(1, strlen($rdName));
}
}