| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 33 | class CustomFieldsModelUnitTest extends \PHPUnit\Framework\TestCase |
||
| 34 | { |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Data provider |
||
| 38 | * |
||
| 39 | * @return array testing data |
||
| 40 | */ |
||
| 41 | public function getFieldForObjectDataProvider(): array |
||
| 42 | { |
||
| 43 | return [ |
||
| 44 | [ |
||
| 45 | [], |
||
| 46 | 'default' |
||
| 47 | ], |
||
| 48 | [ |
||
| 49 | [ |
||
| 50 | [ |
||
| 51 | 'field_value' => '111' |
||
| 52 | ] |
||
| 53 | ], |
||
| 54 | '111' |
||
| 55 | ] |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Testing getFieldForObject |
||
| 61 | * |
||
| 62 | * @param array $data custom fields of the object |
||
| 63 | * @param string $expectedResult expected result of the call getFieldForObject |
||
| 64 | * @dataProvider getFieldForObjectDataProvider |
||
| 65 | */ |
||
| 66 | public function testGetExistingCustomField(array $data, string $expectedResult): void |
||
| 77 | } |
||
| 78 | } |
||
| 79 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.