SFIDTest.php in Salesforce Suite 8.4
File
tests/src/Unit/SFIDTest.php
View source
<?php
namespace Drupal\Tests\salesforce\Unit;
use Drupal\Tests\UnitTestCase;
use Drupal\salesforce\SFID;
class SFIDTest extends UnitTestCase {
public static $modules = [
'salesforce',
];
public function testGoodId() {
$sfid = new SFID('1234567890abcde');
$this
->assertTrue($sfid instanceof SFID);
}
public function testBadId() {
$this
->expectException(\Exception::class);
new SFID('1234567890');
}
public function testConvertId() {
$sfid = new SFID('1234567890adcde');
$this
->assertEquals('1234567890adcdeAAA', $sfid);
}
}