File tree Expand file tree Collapse file tree 3 files changed +11
-17
lines changed
Expand file tree Collapse file tree 3 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ ZEND_END_ARG_INFO()
4242
4343static void php_git_rawobject_free_storage (php_git_rawobject_t * obj TSRMLS_DC )
4444{
45+ /*
4546 if(obj->object->data){
4647 efree(obj->object->data);
4748 obj->object->data = NULL;
@@ -51,7 +52,7 @@ static void php_git_rawobject_free_storage(php_git_rawobject_t *obj TSRMLS_DC)
5152 efree(obj->object);
5253 obj->object= NULL;
5354 }
54-
55+ */
5556 zend_object_std_dtor (& obj -> zo TSRMLS_CC );
5657 efree (obj );
5758}
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ public static function teardownAfterClass()
2626 self ::rmdir (__DIR__ . self ::REPOSITORY_NAME );
2727 }
2828
29+ public function testGetIndex ()
30+ {
31+ $ repository = new Repository (__DIR__ . self ::REPOSITORY_NAME . "/.git " );
32+ $ index = $ repository ->getIndex ();
33+ $ this ->assertInstanceOf ("Git \\Index " ,$ index );
34+ }
35+
36+
2937 public function testAddIndex ()
3038 {
3139 file_put_contents (__DIR__ . self ::REPOSITORY_NAME . "/example " ,"Hello World " );
@@ -79,7 +87,7 @@ public function testGetIterator()
7987
8088 $ this ->assertInstanceOf ("Iterator " ,$ it );
8189 }
82-
90+
8391 public static function rmdir ($ dir )
8492 {
8593 if (is_dir ($ dir )) {
Original file line number Diff line number Diff line change @@ -105,21 +105,6 @@ public function testConstruct()
105105 }
106106 }
107107
108- public function testGetIndex ()
109- {
110-
111- $ git = new Git \Repository (dirname (__DIR__ ) . "/.git/ " );
112- $ index = $ git ->getIndex ();
113- if ($ index instanceof Git \Index){
114- foreach ($ index ->getIterator () as $ entry ){
115- $ this ->assertInstanceof ("Git \\Index \\Entry " ,$ entry );
116- }
117- return true ;
118- }else {
119- return false ;
120- }
121- }
122-
123108 public function testInitRepository ()
124109 {
125110 require_once __DIR__ . "/lib/MemoryBackend.php " ;
You can’t perform that action at this time.
0 commit comments