public function setUp()
 {
     $this->sets[] = array($this->slice(array(), array('owner' => 'fairy', $this->itemOptionName => 'flower')), array('ownerModel' => 'fairy', 'itemModel' => 'flower', $this->ownerProperty => $this->defaultOwnerProperty, 'path' => $this->defaultOwnerProperty));
     $itemOptionsPrefix = $this->itemOptionName . 'Options';
     $this->sets[] = array($this->slice(array($itemOptionsPrefix . '.path' => 'favourite', 'ownerOptions.' . $this->itemOptionName . 'Property' => 'plants'), array('owner' => 'fairy', $this->itemOptionName => 'flower')), array('ownerModel' => 'fairy', 'itemModel' => 'flower', $this->ownerProperty => 'plants', 'path' => 'favourite'));
     parent::setUp();
 }
 public function setUp()
 {
     $this->sets[] = array($this->slice(array(), array('owner' => 'fairy', $this->itemOptionName => 'flower')), array('ownerModel' => 'fairy', 'itemModel' => 'flower', 'ownerKey' => 'fairyId', 'onDelete' => 'update', $this->ownerProperty => $this->defaultOwnerProperty, 'itemOwnerProperty' => 'fairy'));
     $itemOptionsPrefix = $this->itemOptionName . 'Options';
     $this->sets[] = array($this->slice(array($itemOptionsPrefix . '.ownerProperty' => 'pixie', $itemOptionsPrefix . '.ownerKey' => 'ownerId', $itemOptionsPrefix . '.onOwnerDelete' => 'delete', 'ownerOptions.' . $this->itemOptionName . 'Property' => 'plants'), array('owner' => 'fairy', $this->itemOptionName => 'flower')), array('ownerModel' => 'fairy', 'itemModel' => 'flower', 'ownerKey' => 'ownerId', 'onDelete' => 'delete', $this->ownerProperty => 'plants', 'itemOwnerProperty' => 'pixie'));
     parent::setUp();
 }
Ejemplo n.º 3
0
 public function setUp()
 {
     $this->sets[] = array($this->slice(array(), array('left' => 'fairy', 'right' => 'flower')), array('leftModel' => 'fairy', 'leftProperty' => 'flowers', 'leftPivotKey' => 'fairyId', 'rightModel' => 'flower', 'rightProperty' => 'fairies', 'rightPivotKey' => 'flowerId', 'pivot' => 'fairiesFlowers', 'pivotConnection' => null));
     $this->sets[] = array($this->slice(array('leftOptions.property' => 'favourites', 'rightOptions.property' => 'owners', 'pivot' => 'favouriteFlowers', 'pivotOptions.connection' => 'mysql', 'pivotOptions.leftKey' => 'fairyId', 'pivotOptions.rightKey' => 'flowerId'), array('left' => 'fairy', 'right' => 'flower')), array('leftModel' => 'fairy', 'leftProperty' => 'favourites', 'leftPivotKey' => 'fairyId', 'rightModel' => 'flower', 'rightProperty' => 'owners', 'rightPivotKey' => 'flowerId', 'pivot' => 'favouriteFlowers', 'pivotConnection' => 'mysql'));
     parent::setUp();
 }