Almost every test are here, still Model Test missing, many tests don't work cause of API is not deploy anymore
continuous-integration/drone/push Build is failing Details

unit_test
dorian.hodin 2 years ago
parent 53dd1f49cf
commit 49149ab1c1

@ -11,6 +11,7 @@ $views['categories'] = 'Views/HTML/categories.php';
$views['questions'] = 'Views/HTML/questions.php';
$views['responses'] = 'Views/HTML/responses.php';
$views['thanks'] = 'Views/HTML/thanks.php';
$views['error']='Views/HTML/error.php';
$_SERVER['BASE_URI'] = '';

@ -3,8 +3,6 @@
namespace Controller;
use Exception;
use PDOException;
use Config\Validate;
use Config\Clean;
use Config\AltoRouter;
@ -13,9 +11,12 @@ use Config\AltoRouter;
*/
class FrontController {
private $router;
private $rights;
private AltoRouter $router;
private array $rights;
/**
* @throws Exception
*/
public function __construct() {
$this->router = new AltoRouter();
$this->router->setBasePath($_SERVER['BASE_URI']);
@ -26,7 +27,23 @@ class FrontController {
);
}
public function run() {
/**
* @return array
*/
public function getRights(): array
{
return $this->rights;
}
/**
* @return AltoRouter
*/
public function getRouter(): AltoRouter
{
return $this->router;
}
public function run(): void
{
global $error,$rep,$views;
$exists=false;
$match = $this->router->match();
@ -56,7 +73,11 @@ class FrontController {
}
}
private function mapRoutes() {
/**
* @throws Exception
*/
protected function mapRoutes(): void
{
global $controller;
$this->router->map('GET', '/', array($controller['Candidate'], 'goToForm'), 'goToForm');
$this->router->map('POST', '/submitForm', array($controller['Candidate'], 'submitForm'), 'submitForm');
@ -73,4 +94,4 @@ class FrontController {
$this->router->map('GET','/goToQuestions',array($controller['Admin'],'goToQuestions'),'goToQuestions');
$this->router->map('GET','/goToResponses',array($controller['Admin'],'goToResponses'),'goToResponses');
}
}
}

@ -6,7 +6,7 @@ use Exception;
class InvalidUsernameOrPasswordException extends Exception
{
public function __construct($message = "nom d'utilisateur ou mot de passe invalide", $code = 0, Exception $previous = null)
public function __construct($message = "Nom d'utilisateur ou mot de passe invalide", $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}

@ -0,0 +1,100 @@
<?php
namespace TestController;
use InvalidArgumentException;
use Model\ModelAdmin;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\TestCase;
use Controller\ControllerAdmin;
use stdClass;
class ControllerAdminTest extends TestCase
{
/**
* @throws \Exception
*/
public function testAddQuestionThrowsExceptionWhenTypeIsMissing()
{
$controller = new ControllerAdmin();
$_POST['type'] = '';
$this->expectException(InvalidArgumentException::class);
$controller->addQuestion();
}
/**
* @throws Exception
* @throws \Exception
*/
public function testAddQuestionCallsModelAdminAndGoesToQuestionsWhenTypeIsTextQuestion()
{
$modelMock = $this->createMock(ModelAdmin::class);
$modelMock->expects($this->once())->method('addQuestion');
$controller = new ControllerAdmin();
$controller->goToQuestions = $this->createMock(stdClass::class); // mock the method
$_POST['type'] = 'BusinessClass\TextQuestion';
$controller->addQuestion();
}
/**
* @throws Exception
* @throws \Exception
*/
public function testAddQuestionCallsModelAdminAndRequiresPossibleResponsesFormWhenTypeIsNotTextQuestion()
{
$modelMock = $this->createMock(ModelAdmin::class);
$modelMock->expects($this->once())->method('addQuestion');
$modelMock->expects($this->once())->method('getCategories');
$controller = new ControllerAdmin();
$controller->goToQuestions = $this->createMock(stdClass::class); // mock the method
$_POST['type'] = 'BusinessClass\OtherQuestion';
$GLOBALS['rep'] = 'path/to/';
$GLOBALS['views'] = ['possibleResponsesForm' => 'path/to/possibleResponsesForm.php'];
$this->expectOutputString(file_get_contents('path/to/possibleResponsesForm.php'));
$controller->addQuestion();
}
/**
* @throws \Exception
*/
public function testAddResponseThrowsExceptionWhenParametersAreMissing()
{
$controller = new ControllerAdmin();
$_POST = [];
$this->expectException(InvalidArgumentException::class);
$controller->addResponse();
}
/**
* @throws Exception
* @throws \Exception
*/
public function testAddResponseCallsModelAdminAndRequiresContinueWhenParametersAreValid()
{
$modelMock = $this->createMock(ModelAdmin::class);
$modelMock->expects($this->once())->method('addResponse');
$modelMock->expects($this->once())->method('getCategories');
$controller = new ControllerAdmin();
$GLOBALS['rep'] = 'path/to/';
$GLOBALS['views'] = ['continue' => 'path/to/continue.php'];
$_POST['idQuestion'] = '123';
$_POST['question'] = 'What is the meaning of life?';
$_POST['type'] = 'BusinessClass\OtherQuestion';
$this->expectOutputString(file_get_contents('path/to/continue.php'));
$controller->addResponse();
}
/**
* @throws \Exception
*/
public function testContinueResponseThrowsExceptionWhenParametersAreMissing()
{
$controller = new ControllerAdmin();
$_POST = [];
$this->expectException(InvalidArgumentException::class);
$controller->continueResponse();
}
}

@ -0,0 +1,104 @@
<?php
namespace TestController;
use PHPUnit\Framework\TestCase;
use Controller\ControllerCandidate;
use Model\ModelCandidate;
use Exception;
class ControllerCandidateTest extends TestCase
{
protected ControllerCandidate $controller;
protected function setUp(): void
{
parent::setUp();
$this->controller = new ControllerCandidate();
}
/**
* @throws \PHPUnit\Framework\MockObject\Exception
* @throws Exception
*/
public function testGoToForm(): void
{
$modelMock = $this->createMock(ModelCandidate::class);
$modelMock->expects($this->once())
->method('getForm')
->willReturn('<form></form>');
$this->controller->goToForm();
$this->expectOutputRegex('/<form>.*<\/form>/s');
}
public function testGoToAdminLogin(): void
{
global $rep, $views;
$this->controller->goToAdminLogin();
$this->expectOutputString(file_get_contents($rep . $views['adminLogin']));
}
/**
* @throws \PHPUnit\Framework\MockObject\Exception
* @throws Exception
*/
public function testSubmitForm(): void
{
$modelMock = $this->createMock(ModelCandidate::class);
$modelMock->expects($this->once())
->method('submitForm');
$this->controller->submitForm();
$this->expectOutputRegex('/' . preg_quote('Location: ?thanks', '/') . '/');
}
public function testGoToThanks(): void
{
global $rep, $views;
$this->controller->goToThanks();
$this->expectOutputString(file_get_contents($rep . $views['thanks']));
}
/**
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testLoginAsAdmin(): void
{
global $rep, $views;
$_SESSION['role'] = 'Admin';
$modelMock = $this->createMock(ModelCandidate::class);
$modelMock->expects($this->once())
->method('login');
$this->controller->login();
$this->expectOutputString(file_get_contents($rep . $views['admin']));
}
/**
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testLoginAsNonAdmin(): void
{
global $rep, $views;
$_SESSION['role'] = 'NonAdmin';
$modelMock = $this->createMock(ModelCandidate::class);
$modelMock->expects($this->once())
->method('login');
$this->controller->login();
$this->expectOutputString(file_get_contents($rep . $views['adminLogin']));
}
/**
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testLoginWithException(): void
{
global $rep, $views;
$_SESSION['role'] = 'NonAdmin';
$modelMock = $this->createMock(ModelCandidate::class);
$modelMock->expects($this->once())
->method('login')
->willThrowException(new Exception('Invalid credentials'));
$this->controller->login();
$this->expectOutputString(file_get_contents($rep . $views['adminLogin']));
}
}

@ -0,0 +1,35 @@
<?php
namespace TestController;
use PHPUnit\Framework\TestCase;
use Controller\FrontController;
class FrontControllerTest extends TestCase
{
private FrontController $frontController;
public function setUp(): void
{
$this->frontController = new FrontController();
}
public function testRouterInstance(): void
{
$this->assertInstanceOf('\Config\AltoRouter', $this->frontController->getRouter());
}
public function testRightsInstance(): void
{
$this->assertIsArray($this->frontController->getRights());
}
public function testRunMethod(): void
{
$this->expectOutputString('');
$_SERVER['BASE_URI'] = '/';
$_SESSION['role'] = 'Candidate';
$this->frontController->run();
}
}

@ -0,0 +1,18 @@
<?php
namespace TestException;
use Exception;
use Exceptions\InexistantLoginException;
use PHPUnit\Framework\TestCase;
class InexistantLoginExceptionTest extends TestCase
{
public function testConstructor()
{
$exception = new InexistantLoginException();
$this->assertInstanceOf(InexistantLoginException::class, $exception);
$this->assertInstanceOf(Exception::class, $exception);
$this->assertEquals("Identifiant inexistant", $exception->getMessage());
}
}

@ -0,0 +1,18 @@
<?php
namespace TestException;
use Exception;
use PHPUnit\Framework\TestCase;
use Exceptions\InvalidLoginOrPasswordException;
class InvalidLoginOrPasswordExceptionTest extends TestCase
{
public function testConstructor()
{
$exception = new InvalidLoginOrPasswordException();
$this->assertInstanceOf(InvalidLoginOrPasswordException::class, $exception);
$this->assertInstanceOf(Exception::class, $exception);
$this->assertEquals("Identifiant ou mot de passe invalide", $exception->getMessage());
}
}

@ -0,0 +1,20 @@
<?php
namespace TestException;
use Exception;
use Exceptions\InvalidUsernameOrPasswordException;
use PHPUnit\Framework\TestCase;
use Exceptions\InvalidLoginOrPasswordException;
class InvalidUsernameOrPasswordExceptionTest extends TestCase
{
public function testConstructor()
{
$exception = new InvalidUsernameOrPasswordException();
$this->assertInstanceOf(InvalidUsernameOrPasswordException::class, $exception);
$this->assertInstanceOf(Exception::class, $exception);
$this->assertEquals("Nom d'utilisateur ou mot de passe invalide", $exception->getMessage());
}
}

@ -1,65 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests" tests="38" assertions="70" errors="0" failures="0" skipped="0" time="0.012849">
<testsuite name="TestBusinessClass\BoxQuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" tests="3" assertions="4" errors="0" failures="0" skipped="0" time="0.005575">
<testcase name="testConstructorWithFourArguments" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="10" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="2" time="0.005396"/>
<testcase name="testSetPossibleResponses" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="24" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="1" time="0.000120"/>
<testcase name="testSetCategories" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="40" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="1" time="0.000060"/>
</testsuite>
<testsuite name="TestBusinessClass\FormTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" tests="7" assertions="7" errors="0" failures="0" skipped="0" time="0.000805">
<testcase name="testGetTitleReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="10" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000474"/>
<testcase name="testSetTitleSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="16" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000059"/>
<testcase name="testGetDescriptionReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="23" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000056"/>
<testcase name="testSetDescriptionSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="29" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000055"/>
<testcase name="testGetQuestionsReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="36" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000056"/>
<testcase name="testSetQuestionsSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="48" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000054"/>
<testcase name="testGetIdReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="61" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000052"/>
</testsuite>
<testsuite name="TestBusinessClass\IPrintQuestionStrategyTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\IPrintQuestionStrategyTest.php" tests="1" assertions="1" errors="0" failures="0" skipped="0" time="0.000072">
<testcase name="testPrintStrategy" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\IPrintQuestionStrategyTest.php" line="10" class="TestBusinessClass\IPrintQuestionStrategyTest" classname="TestBusinessClass.IPrintQuestionStrategyTest" assertions="1" time="0.000072"/>
</testsuite>
<testsuite name="TestBusinessClass\KeywordTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.000347">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" line="10" class="TestBusinessClass\KeywordTest" classname="TestBusinessClass.KeywordTest" assertions="2" time="0.000295"/>
<testcase name="testSetWord" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" line="20" class="TestBusinessClass\KeywordTest" classname="TestBusinessClass.KeywordTest" assertions="1" time="0.000052"/>
</testsuite>
<testsuite name="TestBusinessClass\QuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.000110">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" line="10" class="TestBusinessClass\QuestionTest" classname="TestBusinessClass.QuestionTest" assertions="2" time="0.000061"/>
<testcase name="testSetContent" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" line="25" class="TestBusinessClass\QuestionTest" classname="TestBusinessClass.QuestionTest" assertions="1" time="0.000050"/>
</testsuite>
<testsuite name="TestBusinessClass\ResponseTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" tests="2" assertions="7" errors="0" failures="0" skipped="0" time="0.000415">
<testcase name="testGetters" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" line="18" class="TestBusinessClass\ResponseTest" classname="TestBusinessClass.ResponseTest" assertions="4" time="0.000356"/>
<testcase name="testSetters" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" line="28" class="TestBusinessClass\ResponseTest" classname="TestBusinessClass.ResponseTest" assertions="3" time="0.000059"/>
</testsuite>
<testsuite name="TestBusinessClass\TextQuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\TextQuestionTest.php" tests="1" assertions="1" errors="0" failures="0" skipped="0" time="0.000304">
<testcase name="testPrintStrategy" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\TextQuestionTest.php" line="10" class="TestBusinessClass\TextQuestionTest" classname="TestBusinessClass.TextQuestionTest" assertions="1" time="0.000304"/>
</testsuite>
<testsuite name="TestConfig\AltoRouterTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" tests="7" assertions="7" errors="0" failures="0" skipped="0" time="0.002022">
<testcase name="testAddRoutesThrowsExceptionForInvalidInput" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="23" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000912"/>
<testcase name="testGetRoutesReturnsArrayOfRoutes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="29" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000390"/>
<testcase name="testSetBasePathSetsBasePath" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="34" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000077"/>
<testcase name="testAddMatchTypesAddsMatchTypes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="40" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000442"/>
<testcase name="testMapAddsRouteToRoutesArray" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="49" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000070"/>
<testcase name="testMapAddsNamedRouteToNamedRoutesArray" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="58" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000062"/>
<testcase name="testMapThrowsExceptionForDuplicateNamedRoutes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="67" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000069"/>
</testsuite>
<testsuite name="TestConfig\AutoloadTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.000847">
<testcase name="testCharger" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" line="11" class="TestConfig\AutoloadTest" classname="TestConfig.AutoloadTest" assertions="2" time="0.000598"/>
<testcase name="testShutDown" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" line="20" class="TestConfig\AutoloadTest" classname="TestConfig.AutoloadTest" assertions="1" time="0.000249"/>
</testsuite>
<testsuite name="TestConfig\CleanTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" tests="3" assertions="6" errors="0" failures="0" skipped="0" time="0.000955">
<testcase name="testSimpleString" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="10" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000297"/>
<testcase name="testEmail" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="23" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000591"/>
<testcase name="testInt" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="35" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000067"/>
</testsuite>
<testsuite name="TestConfig\ValidateTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" tests="8" assertions="28" errors="0" failures="0" skipped="0" time="0.001397">
<testcase name="testEmail" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="11" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.001018"/>
<testcase name="testLogin" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="18" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="4" time="0.000057"/>
<testcase name="testPassword" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="26" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="5" time="0.000080"/>
<testcase name="testKeyWord" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="35" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000048"/>
<testcase name="testTitle" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="42" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000046"/>
<testcase name="testType" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="49" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000050"/>
<testcase name="testResponse" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="56" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000048"/>
<testcase name="testUsername" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="63" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="4" time="0.000050"/>
<testsuite name="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests" tests="57" assertions="84" errors="11" failures="2" skipped="0" time="0.472082">
<testsuite name="TestBusinessClass\BoxQuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" tests="3" assertions="4" errors="0" failures="0" skipped="0" time="0.005328">
<testcase name="testConstructorWithFourArguments" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="10" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="2" time="0.005208"/>
<testcase name="testSetPossibleResponses" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="24" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="1" time="0.000065"/>
<testcase name="testSetCategories" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\BoxQuestionTest.php" line="40" class="TestBusinessClass\BoxQuestionTest" classname="TestBusinessClass.BoxQuestionTest" assertions="1" time="0.000056"/>
</testsuite>
<testsuite name="TestBusinessClass\FormTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" tests="7" assertions="7" errors="0" failures="0" skipped="0" time="0.000624">
<testcase name="testGetTitleReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="10" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000283"/>
<testcase name="testSetTitleSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="16" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000057"/>
<testcase name="testGetDescriptionReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="23" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000057"/>
<testcase name="testSetDescriptionSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="29" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000056"/>
<testcase name="testGetQuestionsReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="36" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000058"/>
<testcase name="testSetQuestionsSetsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="48" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000061"/>
<testcase name="testGetIdReturnsCorrectValue" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\FormTest.php" line="61" class="TestBusinessClass\FormTest" classname="TestBusinessClass.FormTest" assertions="1" time="0.000053"/>
</testsuite>
<testsuite name="TestBusinessClass\IPrintQuestionStrategyTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\IPrintQuestionStrategyTest.php" tests="1" assertions="1" errors="0" failures="0" skipped="0" time="0.000054">
<testcase name="testPrintStrategy" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\IPrintQuestionStrategyTest.php" line="10" class="TestBusinessClass\IPrintQuestionStrategyTest" classname="TestBusinessClass.IPrintQuestionStrategyTest" assertions="1" time="0.000054"/>
</testsuite>
<testsuite name="TestBusinessClass\KeywordTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.000299">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" line="10" class="TestBusinessClass\KeywordTest" classname="TestBusinessClass.KeywordTest" assertions="2" time="0.000248"/>
<testcase name="testSetWord" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\KeywordTest.php" line="20" class="TestBusinessClass\KeywordTest" classname="TestBusinessClass.KeywordTest" assertions="1" time="0.000051"/>
</testsuite>
<testsuite name="TestBusinessClass\QuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.000100">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" line="10" class="TestBusinessClass\QuestionTest" classname="TestBusinessClass.QuestionTest" assertions="2" time="0.000053"/>
<testcase name="testSetContent" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\QuestionTest.php" line="25" class="TestBusinessClass\QuestionTest" classname="TestBusinessClass.QuestionTest" assertions="1" time="0.000048"/>
</testsuite>
<testsuite name="TestBusinessClass\ResponseTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" tests="2" assertions="7" errors="0" failures="0" skipped="0" time="0.000334">
<testcase name="testGetters" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" line="18" class="TestBusinessClass\ResponseTest" classname="TestBusinessClass.ResponseTest" assertions="4" time="0.000283"/>
<testcase name="testSetters" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\ResponseTest.php" line="28" class="TestBusinessClass\ResponseTest" classname="TestBusinessClass.ResponseTest" assertions="3" time="0.000051"/>
</testsuite>
<testsuite name="TestBusinessClass\TextQuestionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\TextQuestionTest.php" tests="1" assertions="1" errors="0" failures="0" skipped="0" time="0.000258">
<testcase name="testPrintStrategy" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestBusinessClass\TextQuestionTest.php" line="10" class="TestBusinessClass\TextQuestionTest" classname="TestBusinessClass.TextQuestionTest" assertions="1" time="0.000258"/>
</testsuite>
<testsuite name="TestConfig\AltoRouterTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" tests="7" assertions="7" errors="0" failures="0" skipped="0" time="0.001873">
<testcase name="testAddRoutesThrowsExceptionForInvalidInput" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="23" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000844"/>
<testcase name="testGetRoutesReturnsArrayOfRoutes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="29" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000426"/>
<testcase name="testSetBasePathSetsBasePath" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="34" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000057"/>
<testcase name="testAddMatchTypesAddsMatchTypes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="40" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000356"/>
<testcase name="testMapAddsRouteToRoutesArray" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="49" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000059"/>
<testcase name="testMapAddsNamedRouteToNamedRoutesArray" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="58" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000060"/>
<testcase name="testMapThrowsExceptionForDuplicateNamedRoutes" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AltoRouterTest.php" line="67" class="TestConfig\AltoRouterTest" classname="TestConfig.AltoRouterTest" assertions="1" time="0.000073"/>
</testsuite>
<testsuite name="TestConfig\AutoloadTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" tests="2" assertions="3" errors="0" failures="0" skipped="0" time="0.001065">
<testcase name="testCharger" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" line="11" class="TestConfig\AutoloadTest" classname="TestConfig.AutoloadTest" assertions="2" time="0.000759"/>
<testcase name="testShutDown" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\AutoloadTest.php" line="20" class="TestConfig\AutoloadTest" classname="TestConfig.AutoloadTest" assertions="1" time="0.000306"/>
</testsuite>
<testsuite name="TestConfig\CleanTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" tests="3" assertions="6" errors="0" failures="0" skipped="0" time="0.000986">
<testcase name="testSimpleString" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="10" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000345"/>
<testcase name="testEmail" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="23" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000572"/>
<testcase name="testInt" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\CleanTest.php" line="35" class="TestConfig\CleanTest" classname="TestConfig.CleanTest" assertions="2" time="0.000070"/>
</testsuite>
<testsuite name="TestConfig\ValidateTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" tests="8" assertions="28" errors="0" failures="0" skipped="0" time="0.001577">
<testcase name="testEmail" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="11" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.001061"/>
<testcase name="testLogin" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="18" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="4" time="0.000059"/>
<testcase name="testPassword" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="26" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="5" time="0.000157"/>
<testcase name="testKeyWord" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="35" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000077"/>
<testcase name="testTitle" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="42" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000051"/>
<testcase name="testType" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="49" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000054"/>
<testcase name="testResponse" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="56" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="3" time="0.000063"/>
<testcase name="testUsername" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestConfig\ValidateTest.php" line="63" class="TestConfig\ValidateTest" classname="TestConfig.ValidateTest" assertions="4" time="0.000055"/>
</testsuite>
<testsuite name="TestController\ControllerAdminTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" tests="6" assertions="3" errors="3" failures="2" skipped="0" time="0.282437">
<testcase name="testAddQuestionThrowsExceptionWhenTypeIsMissing" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="18" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="1" time="0.000633"/>
<testcase name="testAddQuestionCallsModelAdminAndGoesToQuestionsWhenTypeIsTextQuestion" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="30" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="0" time="0.024134">
<error type="TypeError">TestController\ControllerAdminTest::testAddQuestionCallsModelAdminAndGoesToQuestionsWhenTypeIsTextQuestion&#13;
TypeError: BusinessClass\Question::__construct(): Argument #2 ($content) must be of type string, null given, called in F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php on line 47
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\BusinessClass\Question.php:25
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:29
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php:37</error>
</testcase>
<testcase name="testAddQuestionCallsModelAdminAndRequiresPossibleResponsesFormWhenTypeIsNotTextQuestion" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="44" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="0" time="0.001467">
<error type="Error">TestController\ControllerAdminTest::testAddQuestionCallsModelAdminAndRequiresPossibleResponsesFormWhenTypeIsNotTextQuestion&#13;
Error: Class "BusinessClass\OtherQuestion" not found
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:29
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php:55</error>
</testcase>
<testcase name="testAddResponseThrowsExceptionWhenParametersAreMissing" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="61" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="1" time="0.108967">
<failure type="PHPUnit\Framework\ExpectationFailedException">TestController\ControllerAdminTest::testAddResponseThrowsExceptionWhenParametersAreMissing&#13;
Failed asserting that exception of type "Exception" matches expected exception "InvalidArgumentException". Message was: "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/insertResponseInQuestion?%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20response=&amp;%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20categories=Array&amp;%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20$idQuestion=" at
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:110
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:28
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:48
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php:35
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php:71
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:63
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\HandlerStack.php:75
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:331
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:168
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:187
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php:84
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:53
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php:66
.</failure>
</testcase>
<testcase name="testAddResponseCallsModelAdminAndRequiresContinueWhenParametersAreValid" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="73" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="0" time="0.062023">
<error type="Exception">TestController\ControllerAdminTest::testAddResponseCallsModelAdminAndRequiresContinueWhenParametersAreValid&#13;
Exception: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/insertResponseInQuestion?%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20response=&amp;%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20categories=Array&amp;%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20$idQuestion=123
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:110
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:28
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:48
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php:35
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php:71
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:63
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\HandlerStack.php:75
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:331
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:168
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:187
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php:84
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:53
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php:85</error>
</testcase>
<testcase name="testContinueResponseThrowsExceptionWhenParametersAreMissing" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php" line="91" class="TestController\ControllerAdminTest" classname="TestController.ControllerAdminTest" assertions="1" time="0.085213">
<failure type="PHPUnit\Framework\ExpectationFailedException">TestController\ControllerAdminTest::testContinueResponseThrowsExceptionWhenParametersAreMissing&#13;
Failed asserting that exception of type "Exception" matches expected exception "InvalidArgumentException". Message was: "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/existsForm" at
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:110
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:28
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:48
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php:35
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php:71
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:63
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\HandlerStack.php:75
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:331
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:168
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:187
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelAdmin.php:167
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:136
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerAdmin.php:84
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerAdminTest.php:96
.</failure>
</testcase>
</testsuite>
<testsuite name="TestController\ControllerCandidateTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" tests="7" assertions="0" errors="7" failures="0" skipped="0" time="0.174716">
<testcase name="testGoToForm" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="25" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.084069">
<error type="Exception">TestController\ControllerCandidateTest::testGoToForm&#13;
Exception: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:110
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:28
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:48
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php:35
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php:71
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:63
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\HandlerStack.php:75
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:331
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:168
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:187
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php:88
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:23
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:31</error>
</testcase>
<testcase name="testGoToAdminLogin" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="35" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.001266">
<error type="Error">TestController\ControllerCandidateTest::testGoToAdminLogin&#13;
Error: Failed opening required 'path/to/' (include_path='.;C:\php\pear')
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:38</error>
</testcase>
<testcase name="testSubmitForm" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="46" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.085249">
<error type="Exception">TestController\ControllerCandidateTest::testSubmitForm&#13;
Exception: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:110
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php:47
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:28
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php:48
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php:35
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:31
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php:71
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Middleware.php:63
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\HandlerStack.php:75
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:331
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:168
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\vendor\guzzlehttp\guzzle\src\Client.php:187
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php:62
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:42
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:51</error>
</testcase>
<testcase name="testGoToThanks" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="55" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.001234">
<error type="Error">TestController\ControllerCandidateTest::testGoToThanks&#13;
Error: Failed opening required 'path/to/' (include_path='.;C:\php\pear')
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:49
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:58</error>
</testcase>
<testcase name="testLoginAsAdmin" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="65" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.000900">
<error type="TypeError">TestController\ControllerCandidateTest::testLoginAsAdmin&#13;
TypeError: Config\Clean::simpleString(): Argument #1 ($string) must be of type string, null given, called in F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php on line 154
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\Clean.php:16
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php:154
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:55
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:72</error>
</testcase>
<testcase name="testLoginAsNonAdmin" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="79" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.000867">
<error type="TypeError">TestController\ControllerCandidateTest::testLoginAsNonAdmin&#13;
TypeError: Config\Clean::simpleString(): Argument #1 ($string) must be of type string, null given, called in F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php on line 154
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\Clean.php:16
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php:154
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:55
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:86</error>
</testcase>
<testcase name="testLoginWithException" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php" line="93" class="TestController\ControllerCandidateTest" classname="TestController.ControllerCandidateTest" assertions="0" time="0.001131">
<error type="TypeError">TestController\ControllerCandidateTest::testLoginWithException&#13;
TypeError: Config\Clean::simpleString(): Argument #1 ($string) must be of type string, null given, called in F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php on line 154
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Config\Clean.php:16
F:\Documents\SAE4.01_FORMULAIRE\Source\Model\ModelCandidate.php:154
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\ControllerCandidate.php:55
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\ControllerCandidateTest.php:101</error>
</testcase>
</testsuite>
<testsuite name="TestController\FrontControllerTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\FrontControllerTest.php" tests="3" assertions="2" errors="1" failures="0" skipped="0" time="0.001473">
<testcase name="testRouterInstance" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\FrontControllerTest.php" line="18" class="TestController\FrontControllerTest" classname="TestController.FrontControllerTest" assertions="1" time="0.000343"/>
<testcase name="testRightsInstance" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\FrontControllerTest.php" line="23" class="TestController\FrontControllerTest" classname="TestController.FrontControllerTest" assertions="1" time="0.000059"/>
<testcase name="testRunMethod" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\FrontControllerTest.php" line="28" class="TestController\FrontControllerTest" classname="TestController.FrontControllerTest" assertions="0" time="0.001071">
<error type="Error">TestController\FrontControllerTest::testRunMethod&#13;
Error: Failed opening required 'path/to/' (include_path='.;C:\php\pear')
&#13;
F:\Documents\SAE4.01_FORMULAIRE\Source\Controller\FrontController.php:67
F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestController\FrontControllerTest.php:33</error>
</testcase>
</testsuite>
<testsuite name="TestException\InexistantLoginExceptionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InexistantLoginExceptionTest.php" tests="1" assertions="3" errors="0" failures="0" skipped="0" time="0.000409">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InexistantLoginExceptionTest.php" line="11" class="TestException\InexistantLoginExceptionTest" classname="TestException.InexistantLoginExceptionTest" assertions="3" time="0.000409"/>
</testsuite>
<testsuite name="TestException\InvalidLoginOrPasswordExceptionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InvalidLoginOrPasswordExceptionTest.php" tests="1" assertions="3" errors="0" failures="0" skipped="0" time="0.000289">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InvalidLoginOrPasswordExceptionTest.php" line="11" class="TestException\InvalidLoginOrPasswordExceptionTest" classname="TestException.InvalidLoginOrPasswordExceptionTest" assertions="3" time="0.000289"/>
</testsuite>
<testsuite name="TestException\InvalidUsernameOrPasswordExceptionTest" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InvalidUsernameOrPasswordExceptionTest.php" tests="1" assertions="3" errors="0" failures="0" skipped="0" time="0.000258">
<testcase name="testConstructor" file="F:\Documents\SAE4.01_FORMULAIRE\Source\Tests\TestException\InvalidUsernameOrPasswordExceptionTest.php" line="13" class="TestException\InvalidUsernameOrPasswordExceptionTest" classname="TestException.InvalidUsernameOrPasswordExceptionTest" assertions="3" time="0.000258"/>
</testsuite>
</testsuite>
</testsuites>

@ -1,9 +1,17 @@
<html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="Views/CSS/common.css">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<title>Error Page</title>
<body class="d-flex flex-column align-items-center">
<h1><?php echo $error ?></h1>
<h1>
<?php if (empty($error)) {
echo "Erreur";
}else{
echo $error;
}
?>
</h1>
</body>
</html>
Loading…
Cancel
Save