19 $evaluation = new \ilTermsOfServiceSequentialDocumentEvaluation(
26 $this->assertFalse($evaluation->hasDocument());
38 $evaluation = new \ilTermsOfServiceSequentialDocumentEvaluation(
45 $this->
assertException(\ilTermsOfServiceNoSignableDocumentFoundException::class);
47 $evaluation->document();
60 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
64 ->expects($this->exactly(1))
69 $evaluation = new \ilTermsOfServiceSequentialDocumentEvaluation(
76 $this->assertTrue($evaluation->hasDocument());
77 $this->assertEquals($doc, $evaluation->document());
90 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
94 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
98 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
102 ->expects($this->exactly(3))
109 ->will($this->returnValueMap([
115 $evaluation = new \ilTermsOfServiceSequentialDocumentEvaluation(
119 [$doc1, $doc2, $doc3]
122 $this->assertTrue($evaluation->hasDocument());
123 $this->assertEquals($doc2, $evaluation->document());
136 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
140 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
144 ->getMockBuilder(\ilTermsOfServiceSignableDocument::class)
148 ->expects($this->exactly(3))
155 ->will($this->returnValueMap([
161 $evaluation = new \ilTermsOfServiceSequentialDocumentEvaluation(
165 [$doc1, $doc2, $doc3]
168 $this->assertTrue($evaluation->hasDocument());
169 $this->assertEquals($doc2, $evaluation->document());
testExceptionIsRaisedIfADocumentIsRequestedFromEvaluatorAndNoDocumentExistsAtAll()
testAskingEvaluatorForDocumentExistenceIfNoDocumentExistAtAllResultsInANegativeAnswer()
assertException(string $exceptionClass)
testDocumentOnArbitraryPositionIsReturnedMatchingFirstDocumentWithASucceededEvaluation()
Class ilTermsOfServiceAcceptanceEntityTest.
testFirstDocumentIsReturnedIfEvaluationOfFirstDocumentSucceeded()
testFirstMatchingDocumentIsReturnedIfEvaluationOfMultipleDocumentsSucceeded()
Class ilTermsOfServiceEvaluationBaseTest.