public function SObjectTest::testFieldExists in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 tests/src/Unit/SObjectTest.php \Drupal\Tests\salesforce\Unit\SObjectTest::testFieldExists()
- 5.0.x tests/src/Unit/SObjectTest.php \Drupal\Tests\salesforce\Unit\SObjectTest::testFieldExists()
Test valid field call.
File
- tests/
src/ Unit/ SObjectTest.php, line 66
Class
- SObjectTest
- Test Object instantitation.
Namespace
Drupal\Tests\salesforce\UnitCode
public function testFieldExists() {
$sobject = new SObject([
'id' => '1234567890abcde',
'attributes' => [
'type' => 'dummy',
],
'name' => 'Example',
]);
$this
->assertEquals('Example', $sobject
->field('name'));
}