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.
38 lines
912 B
38 lines
912 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
namespace Chamilo\Tests\CoreBundle\Controller;
|
|
|
|
use Chamilo\Tests\AbstractApiTest;
|
|
use Chamilo\Tests\ChamiloTestTrait;
|
|
|
|
class SessionControllerTest extends AbstractApiTest
|
|
{
|
|
use ChamiloTestTrait;
|
|
|
|
public function testAbout(): void
|
|
{
|
|
self::bootKernel();
|
|
|
|
$session = $this->createSession('session 1');
|
|
|
|
$tokenFrom = $this->getUserToken(
|
|
[
|
|
'username' => 'admin',
|
|
'password' => 'admin',
|
|
]
|
|
);
|
|
|
|
$response = $this->createClientWithCredentials($tokenFrom)->request(
|
|
'POST',
|
|
'/sessions/'.$session->getId().'/about'
|
|
);
|
|
|
|
$this->assertResponseIsSuccessful();
|
|
$this->assertResponseStatusCodeSame(200);
|
|
$this->assertStringContainsString('session 1', $response->getContent());
|
|
}
|
|
}
|
|
|