public function test_should_set_sha() { $sha = '1234567890qwertyuiop'; $tree = new WordPress_GitHub_Sync_Tree(new stdClass()); $tree->set_sha($sha); $this->assertSame($sha, $tree->sha()); }
/** * Returns the commit's tree's sha. * * @return string */ public function tree_sha() { if ($this->tree) { return $this->tree->sha(); } if (isset($this->data->tree)) { return $this->data->tree->sha; } return ''; }