Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/tests/CoreBundle/Controller/IndexControllerTest.php

39 lines
928 B

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\Tests\CoreBundle\Controller;
4 years ago
use Chamilo\CoreBundle\Repository\Node\UserRepository;
use Chamilo\Tests\ChamiloTestTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
class IndexControllerTest extends WebTestCase
{
use ChamiloTestTrait;
4 years ago
public function testIndex()
{
$client = static::createClient();
$client->request('GET', '/');
4 years ago
$this->assertResponseIsSuccessful();
}
public function testUserAccess()
{
$client = static::createClient();
4 years ago
// retrieve the admin
$admin = $this->getUser('admin');
4 years ago
// simulate $testUser being logged in
$client->loginUser($admin);
4 years ago
$client->request('GET', '/account/edit');
$this->assertEquals(Response::HTTP_OK, $client->getResponse()->getStatusCode());
}
}