Example #1
0
 /**
  * @group           DataModel
  * @group           DataModelSetBehaviorParam
  * @covers          FOF30\Model\DataModel::setBehaviorParam
  */
 public function testSetBehaviorParam()
 {
     $config = array('idFieldName' => 'foftest_bare_id', 'tableName' => '#__foftest_bares');
     $model = new DataModelStub(static::$container, $config);
     $result = $model->setBehaviorParam('foo', 'bar');
     $behaviors = ReflectionHelper::getValue($model, '_behaviorParams');
     $this->assertArrayHasKey('foo', $behaviors);
     $this->assertEquals('bar', $behaviors['foo']);
     $this->assertInstanceOf('FOF30\\Model\\DataModel', $result);
 }