Skip to content
Permalink
Browse files

Fixes #1456 fixed the remaining php tests, no fails, 18 exceptions th…

…ough
  • Loading branch information...
fjtheknight committed Jun 9, 2019
1 parent b8ccf81 commit 0c09296e03254b9633750d831b3a1852121cf15e
@@ -12,14 +12,14 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithTooFew()
{
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentO(99);
new MentorO("blah",array($s));
}
public function test_ConstructorWithTooMany()
{
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentO(99);
$s2 = new StudentO(98);
$s3 = new StudentO(97);
@@ -62,7 +62,7 @@ public function test_constructorJustSmallEnough()
public function test_constructorWatchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorO, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentO(99);
new MentorO("blah",array($s, $s));
}
@@ -12,7 +12,7 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithTooFew()
{
$this->expectException(new Exception("Unable to create MentorR, must have at least 3 students"));
$this->expectException(new Exception("Unable to create MentorR, must have at least 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentR(99);
new MentorR("blah",array($s));
}
@@ -67,7 +67,7 @@ public function test_constructorMoreThanBigEnough()
public function test_constructorWatchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorR, must have at least 3 students"));
$this->expectException(new Exception("Unable to create MentorR, must have at least 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentR(99);
new MentorR("blah",array($s,$s));
}
@@ -12,14 +12,14 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithTooFew()
{
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students"));
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentQ(99);
new MentorQ("blah",array($s));
}
public function test_ConstructorWithTooMany()
{
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students"));
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentQ(99);
$s2 = new StudentQ(98);
$s3 = new StudentQ(97);
@@ -42,7 +42,7 @@ public function test_constructorJustRight()
public function test_constructorWatchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students"));
$this->expectException(new Exception("Unable to create MentorQ, must have 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentQ(99);
new MentorQ("blah",array($s, $s));
}
@@ -5,7 +5,7 @@ class OneToMNTest extends UnitTestCase
public function test_cannotCreateNullStudent()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new StudentK(99,null);
}
@@ -104,7 +104,7 @@ public function test_addStudentViaConstructorInformationTooMany()
public function test_createStudentWhenMentorAlreadyHasEnogh()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$m = new MentorK("blah");
new StudentK(10,$m);
new StudentK(11,$m);
@@ -5,7 +5,7 @@ class OneToMandatoryManyTest extends UnitTestCase
public function test_cannotCreateNullStudent()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new StudentM(99,null);
}
@@ -5,7 +5,7 @@ class OneToManyTest extends UnitTestCase
public function test_cannotCreateNullStudent()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new StudentJ(99,null);
}
@@ -5,7 +5,7 @@ class OneToNTest extends UnitTestCase
public function test_cannotCreateNullStudent()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new StudentL(99,null);
}
@@ -99,7 +99,7 @@ public function test_addStudentViaConstructorInformation_tooMany()
public function test_createStudentWhenMentorAlreadyHasEnogh()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$m = new MentorL("blah");
new StudentL(10,$m);
new StudentL(11,$m);
@@ -13,14 +13,14 @@ public function test_ConstructorBuildsBoth()
public function test_ConstructorIfAlreadySet()
{
$this->expectException(new Exception("Unable to create StudentG due to aMentor"));
$this->expectException(new Exception("Unable to create StudentG due to aMentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$m = MentorG::newInstance("a",1);
new StudentG(1,$m);
}
public function test_ConstructorCannotSetNull()
{
$this->expectException(new Exception("Unable to create MentorG due to aStudent"));
$this->expectException(new Exception("Unable to create MentorG due to aStudent. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new MentorG("a",null);
}
@@ -5,7 +5,7 @@ class OneToOptionalNTest extends UnitTestCase
public function test_cannotCreateNullStudent()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new StudentZ(99,null);
}
@@ -41,7 +41,7 @@ public function test_CreateStudentFromMentor()
public function test_CreateStudentFromMentorTooMany()
{
$this->expectException(new Exception("Unable to create student due to mentor"));
$this->expectException(new Exception("Unable to create student due to mentor. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$m = new MentorZ("blah");
new StudentZ(99,$m);
new StudentZ(98,$m);
@@ -12,14 +12,14 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithTooFew()
{
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students"));
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentE();
new MentorE(array($s));
}
public function test_ConstructorWithTooMany()
{
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students"));
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentE();
$s2 = new StudentE();
$s3 = new StudentE();
@@ -65,14 +65,14 @@ public function test_constructorJustSmallEnough()
public function test_constructorWatchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students"));
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentE();
new MentorE(array($s, $s));
}
public function test_constructorCheckForExistingMentorNotEnoughToSurvive()
{
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students"));
$this->expectException(new Exception("Unable to create MentorE, must have 2 to 5 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s1 = new StudentE();
$s2 = new StudentE();
$s3 = new StudentE();
@@ -13,7 +13,7 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithTooFew()
{
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students"));
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentF();
new MentorF(array($s));
}
@@ -35,14 +35,14 @@ public function test_constructorJustBigEnough()
public function test_constructorWatchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students"));
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentF();
new MentorF(array($s, $s));
}
public function test_constructorCheckForExistingMentorNotEnoughToSurvive()
{
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students"));
$this->expectException(new Exception("Unable to create MentorF, must have at least 2 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s1 = new StudentF();
$s2 = new StudentF();
$s3 = new StudentF();
@@ -12,7 +12,7 @@ public function test_CreateStudentWithoutMentor()
public function test_ConstructorWithoutNStudents()
{
$this->expectException(new Exception("Unable to create MentorD, must have 3 students"));
$this->expectException(new Exception("Unable to create MentorD, must have 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentD();
$s2 = new StudentD();
new MentorD(array($s,$s2));
@@ -48,7 +48,7 @@ public function test_setStudents_makeSureAlwaysN()
public function test_setStudents_watchOutForDuplicateEntries()
{
$this->expectException(new Exception("Unable to create MentorD, must have 3 students"));
$this->expectException(new Exception("Unable to create MentorD, must have 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentD();
$s2 = new StudentD();
new MentorD(array($s, $s2, $s));
@@ -96,7 +96,7 @@ public function test_setStudents_empty()
public function test_checkForExistingMentor()
{
$this->expectException(new Exception("Unable to create MentorD, must have 3 students"));
$this->expectException(new Exception("Unable to create MentorD, must have 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s1 = new StudentD();
$s2 = new StudentD();
$s3 = new StudentD();
@@ -67,7 +67,7 @@ public function test_SetMentor()
public function test_UnableToConstructNewSubordinateFromExistingDriverThatAlreadyHasDriver()
{
$this->expectException(new Exception("Unable to create mentor due to student"));
$this->expectException(new Exception("Unable to create mentor due to student. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$student = new StudentB();
new MentorB($student);
new MentorB($student);
@@ -5,14 +5,14 @@ class UnidirectionalMNTest extends UnitTestCase
public function test_constructorTooFew()
{
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentI(99);
new MentorI("blah",array($s));
}
public function test_constructorTooMany()
{
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentI(99);
$s2 = new StudentI(98);
$s3 = new StudentI(97);
@@ -5,7 +5,7 @@ class UnidirectionalMStarTest extends UnitTestCase
public function test_constructorTooFew()
{
$this->expectException(new Exception("Unable to create MentorAL, must have at least 3 students"));
$this->expectException(new Exception("Unable to create MentorAL, must have at least 3 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentAL(99);
$s2 = new StudentAL(98);
new MentorAL("blah",array($s,$s2));
@@ -13,7 +13,7 @@ public function test_ConstructorManySide()
public function test_ConstructorCannotSetNull()
{
$this->expectException(new Exception("Unable to create MentorAH due to aStudent"));
$this->expectException(new Exception("Unable to create MentorAH due to aStudent. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
new MentorAH("a",null);
}
@@ -5,14 +5,14 @@ class UnidirectionalOptionalNTest extends UnitTestCase
public function test_constructorTooFew()
{
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentI(99);
new MentorI("blah",array($s));
}
public function test_constructorTooMany()
{
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students"));
$this->expectException(new Exception("Unable to create MentorI, must have 2 to 4 students. See http://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"));
$s = new StudentI(99);
$s2 = new StudentI(98);
$s3 = new StudentI(97);
@@ -15,7 +15,7 @@ public function __destruct() {
}
public function testCreateWithDuplicates() {
$this->expectException(new RuntimeException("Cannot create due to duplicate id"));
$this->expectException(new RuntimeException("Cannot create due to duplicate id. See http://manual.umple.org?RE003ViolationofUniqueness.html"));
$duplicate = new ItemWithUniqueId("1");
}

0 comments on commit 0c09296

Please sign in to comment.
You can’t perform that action at this time.