parent
d1c3e432db
commit
ad8d4a1e41
@ -0,0 +1,12 @@ |
||||
# define your env variables for the test env here |
||||
KERNEL_CLASS='Chamilo\Kernel' |
||||
APP_SECRET='$ecretf0rt3st' |
||||
SYMFONY_DEPRECATIONS_HELPER=999999 |
||||
PANTHER_APP_ENV=panther |
||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots |
||||
|
||||
DATABASE_HOST='127.0.0.1' |
||||
DATABASE_PORT='3306' |
||||
DATABASE_NAME='chamilo_test' |
||||
DATABASE_USER='chamilo' |
||||
DATABASE_PASSWORD='chamilo' |
@ -0,0 +1,39 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html --> |
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" |
||||
backupGlobals="false" |
||||
colors="true" |
||||
bootstrap="tests/bootstrap.php" |
||||
> |
||||
<php> |
||||
<ini name="error_reporting" value="-1" /> |
||||
<server name="APP_ENV" value="test" force="true" /> |
||||
<server name="SHELL_VERBOSITY" value="-1" /> |
||||
</php> |
||||
|
||||
<testsuites> |
||||
<testsuite name="Project Test Suite"> |
||||
<directory>tests</directory> |
||||
</testsuite> |
||||
</testsuites> |
||||
|
||||
<filter> |
||||
<whitelist processUncoveredFilesFromWhitelist="true"> |
||||
<directory suffix=".php">src</directory> |
||||
</whitelist> |
||||
</filter> |
||||
|
||||
<listeners> |
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" /> |
||||
</listeners> |
||||
|
||||
<extensions> |
||||
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension"/> |
||||
<!-- Run `composer require symfony/panther` before enabling this extension --> |
||||
<!-- |
||||
<extension class="Symfony\Component\Panther\ServerExtension" /> |
||||
--> |
||||
</extensions> |
||||
</phpunit> |
@ -0,0 +1,16 @@ |
||||
<?php |
||||
|
||||
namespace Chamilo\Tests\CoreBundle\Repository\Node; |
||||
|
||||
use Chamilo\CoreBundle\Repository\Node\AccessUrlRepository; |
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; |
||||
|
||||
class AccessUrlRepositoryTest extends KernelTestCase |
||||
{ |
||||
public function testCount() |
||||
{ |
||||
self::bootKernel(); |
||||
$count = self::getContainer()->get(AccessUrlRepository::class)->count([]); |
||||
$this->assertEquals(1, $count); |
||||
} |
||||
} |
Loading…
Reference in new issue