1
0

test adding condorcet vote

This commit is contained in:
2022-09-21 12:39:11 +02:00
parent 1e8adfa5d5
commit 0a30f39eb4
349 changed files with 36658 additions and 0 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);
}
}