Skip to content

Commit

Permalink
Merge pull request #25343 from braders/local-variables-pricefieldvalu…
Browse files Browse the repository at this point in the history
…etest

[REF][PHP8.2] Move to standard varaibles in CRM_Price_BAO_PriceFieldValueTest to avoid dynamic properties
  • Loading branch information
seamuslee001 authored Jan 14, 2023
2 parents c9c99ea + 08c259c commit 117efea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/phpunit/CRM/Price/BAO/PriceFieldValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ public function testEmptyStringLabel() {
];

$price_set = $this->callAPISuccess('price_set', 'create', $priceSetParams);
$this->priceSetID = $price_set['id'];
$priceSetID = $price_set['id'];

$priceFieldParams = [
'price_set_id' => $this->priceSetID,
'price_set_id' => $priceSetID,
'name' => 'grassvariety',
'label' => 'Grass Variety',
'html_type' => 'Text',
'is_enter_qty' => 1,
'is_active' => 1,
];
$priceField = $this->callAPISuccess('price_field', 'create', $priceFieldParams);
$this->priceFieldID = $priceField['id'];
$this->_params = [
'price_field_id' => $this->priceFieldID,
$priceFieldID = $priceField['id'];
$params = [
'price_field_id' => $priceFieldID,
'name' => 'rye_grass',
'label' => '',
'amount' => 1,
'financial_type_id' => 1,
];
$priceFieldValue = CRM_Price_BAO_PriceFieldValue::create($this->_params);
$priceFieldValue = CRM_Price_BAO_PriceFieldValue::create($params);
$priceFieldValue->find(TRUE);
$this->assertEquals('', $priceFieldValue->label);
}
Expand Down

0 comments on commit 117efea

Please sign in to comment.