Skip to content
Snippets Groups Projects
Commit ebe0984f authored by Aaron Bauman's avatar Aaron Bauman
Browse files

Fix tests

parent 114b9ae8
No related branches found
No related tags found
No related merge requests found
Pipeline #453342 canceled
...@@ -192,11 +192,12 @@ class SalesforceMappingTest extends UnitTestCase { ...@@ -192,11 +192,12 @@ class SalesforceMappingTest extends UnitTestCase {
$expectedQuery->addCondition($this->mapping->getPullTriggerDate(), gmdate('Y-m-d\TH:i:s\Z', $start), '>'); $expectedQuery->addCondition($this->mapping->getPullTriggerDate(), gmdate('Y-m-d\TH:i:s\Z', $start), '>');
$expectedQuery->addCondition($this->mapping->getPullTriggerDate(), gmdate('Y-m-d\TH:i:s\Z', $stop), '<'); $expectedQuery->addCondition($this->mapping->getPullTriggerDate(), gmdate('Y-m-d\TH:i:s\Z', $stop), '<');
$expectedQuery->fields = $this->mapping->getPullFieldsArray(); $expectedQuery->fields = $this->mapping->getPullFieldsArray();
$expectedQuery->fields[] = 'Id';
$expectedQuery->fields[] = $this->mapping->getPullTriggerDate();
$expectedQuery->order[$this->mapping->getPullTriggerDate()] = 'ASC'; $expectedQuery->order[$this->mapping->getPullTriggerDate()] = 'ASC';
ksort($expectedQuery->fields); ksort($expectedQuery->fields);
ksort($query->fields); ksort($query->fields);
$expectedQuery->fields['Id'] = 'Id';
$expectedQuery->fields[$this->mapping->getPullTriggerDate()] = $this->mapping->getPullTriggerDate();
$expectedQuery->fields['LastModifiedDate'] = 'LastModifiedDate';
$this->assertEquals($expectedQuery->fields, $query->fields); $this->assertEquals($expectedQuery->fields, $query->fields);
ksort($expectedQuery->order); ksort($expectedQuery->order);
ksort($query->order); ksort($query->order);
......
...@@ -227,12 +227,12 @@ class DeleteHandler { ...@@ -227,12 +227,12 @@ class DeleteHandler {
try { try {
// Flag this entity to avoid duplicate processing. // Flag this entity to avoid duplicate processing.
$entity->setSyncing(TRUE); $entity->setSyncing(TRUE);
$entity_id = $entity->id(),
$entity->delete(); $entity->delete();
$message = 'Deleted entity %label with ID: %id associated with Salesforce Object ID: %sfid'; $message = 'Deleted entity %label with ID: %id associated with Salesforce Object ID: %sfid';
$args = [ $args = [
'%label' => $entity->label(), '%label' => $entity->label(),
'%id' => $mapped_object->entity_id, '%id' => $entity->id(),
'%sfid' => $record['id'], '%sfid' => $record['id'],
]; ];
$this->eventDispatcher->dispatch(new SalesforceNoticeEvent(NULL, $message, $args), SalesforceEvents::NOTICE); $this->eventDispatcher->dispatch(new SalesforceNoticeEvent(NULL, $message, $args), SalesforceEvents::NOTICE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment