Ejemplo n.º 1
0
 public function testAssociationUpdateCanBeDoneManually()
 {
     $testCase = new TestsCases\BaseTestCase();
     $associatedTestCase = new TestsCases\AssociationTestCase();
     $testCase->testPropertyAssociationUpdate($associatedTestCase);
     $this->assertEquals($testCase, $associatedTestCase->getInvertedOneToOneProperty());
 }
Ejemplo n.º 2
0
 public function testInitializedArraysDifferAtEachInitialization()
 {
     $testCase = new TestsCases\BaseTestCase();
     $testCase->addListItem("foo");
     $testCase2 = new TestsCases\BaseTestCase();
     $this->assertEquals(0, count($testCase2->getListItems()));
 }
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testConstraintsValidationCanBeUsedOnCollections()
 {
     $testCase = new TestsCases\BaseTestCase();
     $testCase->addListItem(1);
     $testCase->addListItem(2);
     $testCase->addListItem(3);
     $testCase->addListItem(4);
     $testCase->addListItem(5);
 }
Ejemplo n.º 4
0
 public function testDirectMethodCanBeCalled()
 {
     $testCase = new TestsCases\BaseTestCase();
     $testCase->setCallProperty(42);
     $this->assertEquals(42, $testCase->callProperty());
 }
Ejemplo n.º 5
0
 /**
  * @expectedException \BadMethodCallException
  */
 public function testMapAddMethodCannotAcceptOneArgument()
 {
     $testCase = new TestsCases\BaseTestCase();
     $testCase->addMapItem("item1");
 }