CRM-13072 upgrade additional test classes including fixing activity.type.delete
[civicrm-core.git] / api / v3 / examples / PriceFieldValueCreate.php
CommitLineData
6a488035
TO
1<?php
2
3/*
4
5 */
6function price_field_value_create_example(){
53ca8fd7 7$params = array(
6a488035
TO
8 'version' => 3,
9 'price_field_id' => 13,
10 'membership_type_id' => 5,
11 'name' => 'memType1',
12 'label' => 'memType1',
13 'amount' => 90,
14 'membership_num_terms' => 2,
15 'is_active' => 1,
16 'financial_type_id' => 2,
17);
18
19 $result = civicrm_api( 'price_field_value','create',$params );
20
21 return $result;
22}
23
24/*
25 * Function returns array of result expected from previous function
26 */
27function price_field_value_create_expectedresult(){
28
53ca8fd7 29 $expectedResult = array(
6a488035
TO
30 'is_error' => 0,
31 'version' => 3,
32 'count' => 1,
33 'id' => 10,
53ca8fd7 34 'values' => array(
35 '10' => array(
6a488035
TO
36 'id' => '10',
37 'price_field_id' => '13',
38 'name' => 'memType1',
39 'label' => 'memType1',
40 'description' => '',
41 'amount' => '90',
42 'count' => '',
43 'max_value' => '',
44 'weight' => '1',
45 'membership_type_id' => '5',
46 'membership_num_terms' => '2',
47 'is_default' => '',
48 'is_active' => '1',
49 'financial_type_id' => '2',
50 'deductible_amount' => '',
53ca8fd7 51 'contribution_type_id' => '2',
6a488035
TO
52 ),
53 ),
54);
55
56 return $expectedResult ;
57}
58
59
60/*
61* This example has been generated from the API test suite. The test that created it is called
62*
63* testCreatePriceFieldValuewithMultipleTerms and can be found in
64* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PriceFieldValueTest.php
65*
66* You can see the outcome of the API tests at
67* http://tests.dev.civicrm.org/trunk/results-api_v3
68*
69* To Learn about the API read
70* http://book.civicrm.org/developer/current/techniques/api/
71*
72* and review the wiki at
73* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
74*
75* Read more about testing here
76* http://wiki.civicrm.org/confluence/display/CRM/Testing
77*
78* API Standards documentation:
79* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
80*/