function test_get_differences() { $s = 'http://example.com/subj'; $result = new DataTableResult($this->_select_result_without_uri_pseudo_variable_multiple_rows, $s); $dt = new DataTable("http://example.org/store"); $dt->map('http://example.org/title', 'title'); $dt->set('title', 'baz'); $diffs = $dt->get_differences($result); $this->assertEquals(1, count($diffs)); $this->assertTrue(array_key_exists($s, $diffs)); $this->assertEquals(1, count($diffs[$s]['removals'])); $this->assertTrue(array_key_exists('http://example.org/title', $diffs[$s]['removals'])); $this->assertEquals(2, count($diffs[$s]['removals']['http://example.org/title'])); $this->assertEquals(1, count($diffs[$s]['additions'])); $this->assertTrue(array_key_exists('http://example.org/title', $diffs[$s]['additions'])); $this->assertEquals(1, count($diffs[$s]['additions']['http://example.org/title'])); }