1
0
This commit is contained in:
2022-09-21 14:01:45 +02:00
parent 0a30f39eb4
commit cfee4d93d0
349 changed files with 4 additions and 4 deletions

View File

@ -0,0 +1,82 @@
<?php
declare(strict_types=1);
namespace CondorcetPHP\Condorcet\Tests\Examples;
use PHPUnit\Framework\TestCase;
class ExamplesTest extends TestCase
{
/**
* @runInSeparateProcess
*/
public function testOverviewExample(): void
{
$r = true;
try {
include __DIR__.'/../../Examples/1. Overview.php';
} catch (\Exception $e) {
$r = false;
throw $e;
}
self::assertTrue($r);
}
/**
* @runInSeparateProcess
*/
public function testAdvancedObjectManagementExample(): void
{
$r = true;
try {
include __DIR__.'/../../Examples/2. AdvancedObjectManagement.php';
} catch (\Exception $e) {
throw $e;
$r = false;
}
self::assertTrue($r);
}
/**
* @runInSeparateProcess
*/
public function testGlobalHtmlExample(): void
{
$r = true;
try {
ob_start();
include __DIR__.'/../../Examples/Examples-with-html/A.Global_Example.php';
ob_end_clean();
} catch (\Exception $e) {
throw $e;
$r = false;
}
self::assertTrue($r);
}
/**
* @runInSeparateProcess
*/
public function testRankingManipulationHtmlExample(): void
{
$r = true;
try {
ob_start();
include __DIR__.'/../../Examples/Examples-with-html/B.Ranking_Manipulation.php';
ob_end_clean();
} catch (\Exception $e) {
$r = false;
throw $e;
}
self::assertTrue($r);
}
}