예제 #1
0
 public function testget_old_related_calls()
 {
     $lead = new Lead();
     $expected = array();
     $expected['select'] = 'SELECT calls.id ';
     $expected['from'] = 'FROM calls ';
     $expected['where'] = " WHERE calls.parent_id = '{$this->id}'\n            AND calls.parent_type = 'Leads' AND calls.id NOT IN ( SELECT call_id FROM calls_leads ) ";
     $expected['join'] = "";
     $expected['join_tables'][0] = '';
     $actual = $lead->get_old_related_calls();
     $this->assertSame($expected, $actual);
 }