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.
33 lines
910 B
33 lines
910 B
![]()
4 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
/* For licensing terms, see /license.txt */
|
||
|
|
||
|
namespace Chamilo\Tests\CourseBundle\Settings;
|
||
|
|
||
|
use Chamilo\CourseBundle\Settings\SettingsCourseManager;
|
||
|
use Chamilo\Tests\AbstractApiTest;
|
||
|
use Chamilo\Tests\ChamiloTestTrait;
|
||
|
use InvalidArgumentException;
|
||
|
|
||
|
class SettingsCourseManagerTest extends AbstractApiTest
|
||
|
{
|
||
|
use ChamiloTestTrait;
|
||
|
|
||
|
public function testCreate(): void
|
||
|
{
|
||
|
self::bootKernel();
|
||
|
|
||
|
$em = self::getContainer()->get('doctrine')->getManager();
|
||
|
$settingsManager = self::getContainer()->get(SettingsCourseManager::class);
|
||
|
|
||
|
$this->expectException(InvalidArgumentException::class);
|
||
|
$settingsManager->getSetting('institution');
|
||
|
|
||
|
$platform = $settingsManager->getSetting('platform.institution');
|
||
|
$this->assertNotEmpty($platform);
|
||
|
$this->assertTrue(\count($settingsManager->getSchemas()) > 0);
|
||
|
}
|
||
|
}
|