Esempio n. 1
1
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage "0" is not a valid foreign key option.
  */
 public function testSetOptionThrowsExceptionIfOptionIsNotString()
 {
     $this->fk->setOptions(['update']);
 }
Esempio n. 2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testUnknownActionsNotAlowedThroughOptions()
 {
     $this->fk->setOptions(array('update' => 'no yu a dumb'));
 }
 /**
  * Utility method that maps an array of index options to this objects methods.
  *
  * @param array $options Options
  *
  * @return $this
  */
 public function setOptions(array $options)
 {
     $this->foreign->setOptions($options);
     return $this;
 }