Best Atoum code snippet using vcs.getRevision
GitTest.php
Source:GitTest.php  
...78        $this->assertEquals('file1', $file->getSourcerootPath());79        $this->assertEquals('file1', $file->getPath());80        $this->assertEquals(81            'da46ee2e478c6d3a9963eaafcd8f43e83d630526',82            $file->getRevision());83        $this->assertEquals(84            'd8561cd227c800ee5b0720701c8b6b77e6f6db4a',85            $file->getPreviousRevision('160a468250615b713a7e33d34243530afc4682a9'));86        $this->assertEquals(87             '160a468250615b713a7e33d34243530afc4682a9',88             $file->getPreviousRevision('da46ee2e478c6d3a9963eaafcd8f43e83d630526'));89        $this->assertEquals(3, $file->revisionCount());90        $this->assertEquals(array('tag1' => '160a468250615b713a7e33d34243530afc4682a9'),91                                  $file->getTags());92        $this->assertEquals(93            array('master' => '2d701be7faf94a5fad1942eb763b6c5c6cae540f',94                  'branch1' => 'da46ee2e478c6d3a9963eaafcd8f43e83d630526'),95            $file->getBranches());96        $this->assertFalse($file->isDeleted());97        $file = $this->vcs->getFile('file1', array('branch' => 'master'));98        $this->assertEquals(99            //FIXME? 'master' => '160a468250615b713a7e33d34243530afc4682a9',100            array('master' => 'master',101                  'branch1' => 'da46ee2e478c6d3a9963eaafcd8f43e83d630526'),102            $file->getBranches());103        $file = $this->vcs->getFile('file1', array('branch' => 'branch1'));104        $this->assertEquals(105            array('master' => '2d701be7faf94a5fad1942eb763b6c5c6cae540f',106                  //FIXME? 'branch1' => 'da46ee2e478c6d3a9963eaafcd8f43e83d630526'),107                  'branch1' => 'branch1'),108            $file->getBranches());109        /* Test master branch. */110        $file = $this->vcs->getFile('file1', array('branch' => 'master'));111        $this->assertEquals(112            '160a468250615b713a7e33d34243530afc4682a9',113            $file->getRevision());114        $this->assertEquals(115            'd8561cd227c800ee5b0720701c8b6b77e6f6db4a',116            $file->getPreviousRevision('160a468250615b713a7e33d34243530afc4682a9'));117        $this->assertEquals(2, $file->revisionCount());118        /* Test branch1 branch. */119        $file = $this->vcs->getFile('file1', array('branch' => 'branch1'));120        $this->assertEquals(121            'da46ee2e478c6d3a9963eaafcd8f43e83d630526',122            $file->getRevision());123        $this->assertEquals(124            'd8561cd227c800ee5b0720701c8b6b77e6f6db4a',125            $file->getPreviousRevision('da46ee2e478c6d3a9963eaafcd8f43e83d630526'));126        $this->assertEquals(2, $file->revisionCount());127        /* Test sub-directory file. */128        $file = $this->vcs->getFile('dir1/file1_1');129        $this->assertInstanceOf('Horde_Vcs_File_Git', $file);130        $this->assertEquals('file1_1', $file->getFileName());131        $this->assertEquals('dir1/file1_1', $file->getSourcerootPath());132        $this->assertEquals('dir1/file1_1', $file->getPath());133        $this->assertEquals(134            'd8561cd227c800ee5b0720701c8b6b77e6f6db4a',135            $file->getRevision());136        $this->assertEquals(1, $file->revisionCount());137        $this->assertEquals(array('tag1' => '160a468250615b713a7e33d34243530afc4682a9'),138                                  $file->getTags());139        $this->assertEquals(140            array('master' => '2d701be7faf94a5fad1942eb763b6c5c6cae540f',141                  'branch1' => 'da46ee2e478c6d3a9963eaafcd8f43e83d630526'),142            $file->getBranches());143        $this->assertFalse($file->isDeleted());144        /* Test deleted file. */145        $file = $this->vcs->getFile('deletedfile1');146        $this->assertInstanceOf('Horde_Vcs_File_Git', $file);147        $this->assertEquals('deletedfile1', $file->getFileName());148        $this->assertEquals('deletedfile1', $file->getSourcerootPath());149        $this->assertEquals('deletedfile1', $file->getPath());150        /* FIXME151        $this->assertEquals('1.2', $file->getRevision());152        $this->assertEquals('1.1', $file->getPreviousRevision('1.2'));153        $this->assertEquals(2, $file->revisionCount());154        $this->assertEquals(array(), $file->getTags());155        $this->assertTrue($file->isDeleted());156        */157        /* Test non-existant file. */158        $file = $this->vcs->getFile('foo');159        $this->assertInstanceOf('Horde_Vcs_File_Git', $file);160        try {161            $file->getLog();162            $this->fail('Expected Horde_Vcs_Exception');163        } catch (Horde_Vcs_Exception $e) {164        }165        /* Test unicode file. */166        $file = $this->vcs->getFile('umläüte');167        $this->assertInstanceOf('Horde_Vcs_File_Git', $file);168        $this->assertEquals('umläüte', $file->getFileName());169        $this->assertEquals('umläüte', $file->getSourcerootPath());170        $this->assertEquals('umläüte', $file->getPath());171        $this->assertEquals(172            '2d701be7faf94a5fad1942eb763b6c5c6cae540f',173            $file->getRevision());174        $this->assertNull(175            $file->getPreviousRevision('160a468250615b713a7e33d34243530afc4682a9'));176        $this->assertNull(177             $file->getPreviousRevision('da46ee2e478c6d3a9963eaafcd8f43e83d630526'));178        $this->assertEquals(1, $file->revisionCount());179        //$this->assertEquals(array(), $file->getTags());180        //$this->assertEquals(181        //    array('master' => '2d701be7faf94a5fad1942eb763b6c5c6cae540f'),182        //    $file->getBranches());183        $this->assertFalse($file->isDeleted());184    }185    public function testLog()186    {187        $logs = $this->vcs->getFile('file1')->getLog();188        $this->assertInternalType('array', $logs);189        $this->assertEquals(190            array('da46ee2e478c6d3a9963eaafcd8f43e83d630526',191                  '160a468250615b713a7e33d34243530afc4682a9',192                  'd8561cd227c800ee5b0720701c8b6b77e6f6db4a'),193            array_keys($logs));194        $this->assertInstanceOf(195            'Horde_Vcs_Log_Git',196            $logs['160a468250615b713a7e33d34243530afc4682a9']);197        $log = $logs['160a468250615b713a7e33d34243530afc4682a9'];198        $this->assertEquals(199            '160a468250615b713a7e33d34243530afc4682a9',200            $log->getRevision());201        $this->assertEquals(1322495899, $log->getDate());202        $this->assertEquals('Jan Schneider <jan@horde.org>', $log->getAuthor());203        $this->assertEquals(204            'Commit 2nd version to master branch.',205            $log->getMessage());206        $this->assertEquals(array('master'), $log->getBranch());207        //FIXME $this->assertEquals('+1 -1', $log->getChanges());208        $this->assertEquals(array(), $log->getTags());209        $this->assertEquals(array(), $log->getSymbolicBranches());210        $this->assertEquals(211            array('file1' => array(212                'srcMode' => '100644',213                'dstMode' => '100644',214                'srcSha1' => 'd00491fd7e5bb6fa28c517a0bb32b8b506539d4d',215                'dstSha1' => '0cfbf08886fca9a91cb753ec8734c84fcbe52c9f',216                'status'  => 'M',217                'srcPath' => 'file1',218                'dstPath' => '',219                'added'   => '1',220                'deleted' => '1')),221            $log->getFiles());222        $this->assertEquals(1, $log->getAddedLines());223        $this->assertEquals(1, $log->getDeletedLines());224        $log = $logs['d8561cd227c800ee5b0720701c8b6b77e6f6db4a'];225        $this->assertEquals(226            'd8561cd227c800ee5b0720701c8b6b77e6f6db4a',227            $log->getRevision());228        $this->assertEquals(1322253995, $log->getDate());229        $this->assertEquals('Jan Schneider <jan@horde.org>', $log->getAuthor());230        $this->assertEquals(231            'Add first files.',232            $log->getMessage());233        $this->assertEquals(array('branch1', 'master'), $log->getBranch());234        //FIXME $this->assertEquals('+1 -1', $log->getChanges());235        $this->assertEquals(array(), $log->getTags());236        $this->assertEquals(array(), $log->getSymbolicBranches());237        $this->assertEquals(238            array('dir1/file1_1' => array(239                'srcMode' => '000000',240                'dstMode' => '100644',241                'srcSha1' => '0000000000000000000000000000000000000000',242                'dstSha1' => 'd00491fd7e5bb6fa28c517a0bb32b8b506539d4d',243                'status'  => 'A',244                'srcPath' => 'dir1/file1_1',245                'dstPath' => '',246                'added'   => '1',247                'deleted' => '0'),248                  'file1' => array(249                'srcMode' => '000000',250                'dstMode' => '100644',251                'srcSha1' => '0000000000000000000000000000000000000000',252                'dstSha1' => 'd00491fd7e5bb6fa28c517a0bb32b8b506539d4d',253                'status'  => 'A',254                'srcPath' => 'file1',255                'dstPath' => '',256                'added'   => '1',257                'deleted' => '0',258            )),259            $log->getFiles());260        $this->assertEquals(2, $log->getAddedLines());261        $this->assertEquals(0, $log->getDeletedLines());262        $log = $logs['da46ee2e478c6d3a9963eaafcd8f43e83d630526'];263        $this->assertEquals(264            'da46ee2e478c6d3a9963eaafcd8f43e83d630526',265            $log->getRevision());266        $this->assertEquals(1322495911, $log->getDate());267        $this->assertEquals('Jan Schneider <jan@horde.org>', $log->getAuthor());268        $this->assertEquals(269            'Commit 2nd version to branch1 branch.',270            $log->getMessage());271        $this->assertEquals(array('branch1'), $log->getBranch());272        //FIXME $this->assertEquals('+1 -1', $log->getChanges());273        $this->assertEquals(array(), $log->getTags());274        $this->assertEquals(array(), $log->getSymbolicBranches());275        $this->assertEquals(276            array('file1' => array(277                'srcMode' => '100644',278                'dstMode' => '100644',279                'srcSha1' => 'd00491fd7e5bb6fa28c517a0bb32b8b506539d4d',280                'dstSha1' => '0cfbf08886fca9a91cb753ec8734c84fcbe52c9f',281                'status'  => 'M',282                'srcPath' => 'file1',283                'dstPath' => '',284                'added'   => '1',285                'deleted' => '1')),286            $log->getFiles());287        $this->assertEquals(1, $log->getAddedLines());288        $this->assertEquals(1, $log->getDeletedLines());289        $logs = $this->vcs->getFile('file1', array('branch' => 'master'))290            ->getLog();291        $this->assertInternalType('array', $logs);292        $this->assertEquals(293            array('160a468250615b713a7e33d34243530afc4682a9',294                  'd8561cd227c800ee5b0720701c8b6b77e6f6db4a'),295            array_keys($logs));296        $logs = $this->vcs->getFile('file1', array('branch' => 'branch1'))297            ->getLog();298        $this->assertInternalType('array', $logs);299        $this->assertEquals(300            array('da46ee2e478c6d3a9963eaafcd8f43e83d630526',301                  'd8561cd227c800ee5b0720701c8b6b77e6f6db4a'),302            array_keys($logs));303        $logs = $this->vcs->getFile('umläüte')->getLog();304        $this->assertInternalType('array', $logs);305        $this->assertEquals(306            array('2d701be7faf94a5fad1942eb763b6c5c6cae540f'),307            array_keys($logs));308        $this->assertInstanceOf(309            'Horde_Vcs_Log_Git',310            $logs['2d701be7faf94a5fad1942eb763b6c5c6cae540f']);311    }312    public function testLastLog()313    {314        $log = $this->vcs315            ->getFile('file1')316            ->getLastLog();317        $this->assertInstanceof('Horde_Vcs_QuickLog_Git', $log);318        $this->assertEquals(319            '160a468250615b713a7e33d34243530afc4682a9',320            $log->getRevision());321        $this->assertEquals(1322495899, $log->getDate());322        $this->assertEquals('Jan Schneider <jan@horde.org>', $log->getAuthor());323        $this->assertEquals(324            'Commit 2nd version to master branch.',325            $log->getMessage());326        $log = $this->vcs327            ->getFile('file1', array('branch' => 'branch1'))328            ->getLastLog();329        $this->assertInstanceof('Horde_Vcs_QuickLog_Git', $log);330        $this->assertEquals(331            'da46ee2e478c6d3a9963eaafcd8f43e83d630526',332            $log->getRevision());333        $this->assertEquals(1322495911, $log->getDate());334        $this->assertEquals('Jan Schneider <jan@horde.org>', $log->getAuthor());335        $this->assertEquals(336            'Commit 2nd version to branch1 branch.',337            $log->getMessage());338    }339    public function testPatchset()340    {341        $ps = $this->vcs->getPatchset(array('file' => 'file1'));342        $this->assertInstanceOf('Horde_Vcs_Patchset_Git', $ps);343        $sets = $ps->getPatchsets();344        $this->assertInternalType('array', $sets);345        $this->assertEquals(3, count($sets));346        $this->assertEquals(array('da46ee2e478c6d3a9963eaafcd8f43e83d630526',...CvsTest.php
Source:CvsTest.php  
...86        $this->assertEquals(dirname(__FILE__) . '/repos/cvs/module/file1',87                            $file->getPath());88        $this->assertEquals(dirname(__FILE__) . '/repos/cvs/module/file1,v',89                            $file->getFullPath());90        $this->assertEquals('1.2', $file->getRevision());91        $this->assertEquals('1.1', $file->getPreviousRevision('1.2'));92        $this->assertEquals('1.1', $file->getPreviousRevision('1.1.2.1'));93        $this->assertEquals(3, $file->revisionCount());94        $this->assertEquals(array('tag1' => '1.2'),95                            $file->getTags());96        $this->assertEquals(array('HEAD' => '1.2', 'branch1' => '1.1.2.1'),97                            $file->getBranches());98        $this->assertFalse($file->isDeleted());99        $file = $this->vcs->getFile('module/file1', array('branch' => 'HEAD'));100        $this->assertEquals(array('HEAD' => '1.2', 'branch1' => '1.1.2.1'),101                            $file->getBranches());102        $file = $this->vcs->getFile('module/file1', array('branch' => 'branch1'));103        $this->assertEquals(array('HEAD' => '1.2', 'branch1' => '1.1.2.1'),104                            $file->getBranches());105        /* Test sub-directory file. */106        $file = $this->vcs->getFile('module/dir1/file1_1');107        $this->assertInstanceOf('Horde_Vcs_File_Cvs', $file);108        $this->assertEquals('file1_1', $file->getFileName());109        $this->assertEquals('module/dir1/file1_1', $file->getSourcerootPath());110        $this->assertEquals(111            dirname(__FILE__) . '/repos/cvs/module/dir1/file1_1',112            $file->getPath());113        $this->assertEquals(114            dirname(__FILE__) . '/repos/cvs/module/dir1/file1_1,v',115            $file->getFullPath());116        $this->assertEquals('1.1', $file->getRevision());117        $this->assertEquals(1, $file->revisionCount());118        $this->assertEquals(array('tag1' => '1.1'),119            $file->getTags());120        $this->assertEquals(array('HEAD' => '1.1'), $file->getBranches());121        $this->assertFalse($file->isDeleted());122        /* Test deleted file. */123        $file = $this->vcs->getFile('module/deletedfile1');124        $this->assertInstanceOf('Horde_Vcs_File_Cvs', $file);125        $this->assertEquals('deletedfile1', $file->getFileName());126        $this->assertEquals(127            'module/Attic/deletedfile1',128            $file->getSourcerootPath());129        $this->assertEquals(130            dirname(__FILE__) . '/repos/cvs/module/Attic/deletedfile1',131            $file->getPath());132        $this->assertEquals(133            dirname(__FILE__) . '/repos/cvs/module/Attic/deletedfile1,v',134            $file->getFullPath());135        $this->assertEquals('1.2', $file->getRevision());136        $this->assertEquals('1.1', $file->getPreviousRevision('1.2'));137        $this->assertEquals(2, $file->revisionCount());138        $this->assertEquals(array(), $file->getTags());139        $this->assertTrue($file->isDeleted());140        /* Test non-existant file. */141        try {142            $file = $this->vcs->getFile('foo');143            $this->fail('Expected Horde_Vcs_Exception');144        } catch (Horde_Vcs_Exception $e) {145        }146        /* Test unicode file. */147        $file = $this->vcs->getFile('module/umläüte');148        $this->assertInstanceOf('Horde_Vcs_File_Cvs', $file);149        $this->assertEquals('umläüte', $file->getFileName());150        $this->assertEquals('module/umläüte', $file->getSourcerootPath());151        $this->assertEquals(dirname(__FILE__) . '/repos/cvs/module/umläüte',152                            $file->getPath());153        $this->assertEquals(dirname(__FILE__) . '/repos/cvs/module/umläüte,v',154                            $file->getFullPath());155        $this->assertEquals('1.1', $file->getRevision());156        $this->assertEquals(1, $file->revisionCount());157        $this->assertEquals(array(), $file->getTags());158        $this->assertEquals(array('HEAD' => '1.1'), $file->getBranches());159        $this->assertFalse($file->isDeleted());160    }161    public function testLog()162    {163        $logs = $this->vcs->getFile('module/file1')->getLog();164        $this->assertInternalType('array', $logs);165        $this->assertEquals(array('1.2', '1.1', '1.1.2.1'), array_keys($logs));166        $this->assertInstanceOf('Horde_Vcs_Log_Cvs', $logs['1.2']);167        $log = $logs['1.2'];168        $this->assertEquals('1.2', $log->getRevision());169        $this->assertEquals(1322495647, $log->getDate());170        $this->assertEquals('jan', $log->getAuthor());171        $this->assertEquals(172            'Commit 2nd version to HEAD branch.',173            $log->getMessage());174        $this->assertEquals(array('HEAD'), $log->getBranch());175        $this->assertEquals('+1 -1', $log->getChanges());176        $this->assertEquals(array('tag1'), $log->getTags());177        $this->assertEquals(array(), $log->getSymbolicBranches());178        $this->assertEquals(179            array('module/file1' => array('added' => '1', 'deleted' => '1')),180            $log->getFiles());181        $this->assertEquals(1, $log->getAddedLines());182        $this->assertEquals(1, $log->getDeletedLines());183        $log = $logs['1.1'];184        $this->assertEquals('1.1', $log->getRevision());185        $this->assertEquals(1322254184, $log->getDate());186        $this->assertEquals(187            'Add first files.',188            $log->getMessage());189        $this->assertEquals(array('HEAD'), $log->getBranch());190        $this->assertEquals(array(), $log->getTags());191        $log = $logs['1.1.2.1'];192        $this->assertEquals('1.1.2.1', $log->getRevision());193        $this->assertEquals(1322495667, $log->getDate());194        $this->assertEquals(195            'Commit 2nd version to branch1 branch.',196            $log->getMessage());197        $this->assertEquals(array('branch1'), $log->getBranch());198        $this->assertEquals(array(), $log->getTags());199        $logs = $this->vcs->getFile('module/file1', array('branch' => 'HEAD'))200            ->getLog();201        $this->assertInternalType('array', $logs);202        $this->assertEquals(array('1.2', '1.1'), array_keys($logs));203        $logs = $this->vcs->getFile('module/file1', array('branch' => 'branch1'))204            ->getLog();205        $this->assertInternalType('array', $logs);206        $this->assertEquals(array('1.1', '1.1.2.1'), array_keys($logs));207        $logs = $this->vcs->getFile('module/umläüte')->getLog();208        $this->assertInternalType('array', $logs);209        $this->assertEquals(array('1.1'), array_keys($logs));210        $this->assertInstanceOf('Horde_Vcs_Log_Cvs', $logs['1.1']);211    }212    public function testLastLog()213    {214        $log = $this->vcs215            ->getFile('module/file1')216            ->getLastLog();217        $this->assertInstanceof('Horde_Vcs_QuickLog_Cvs', $log);218        $this->assertEquals('1.2', $log->getRevision());219        $this->assertEquals(1322495647, $log->getDate());220        $this->assertEquals('jan', $log->getAuthor());221        $this->assertEquals(222            'Commit 2nd version to HEAD branch.',223            $log->getMessage());224        $log = $this->vcs225            ->getFile('module/file1', array('branch' => 'branch1'))226            ->getLastLog();227        $this->assertInstanceof('Horde_Vcs_QuickLog_Cvs', $log);228        $this->assertEquals('1.1.2.1', $log->getRevision());229        $this->assertEquals(1322495667, $log->getDate());230        $this->assertEquals('jan', $log->getAuthor());231        $this->assertEquals(232            'Commit 2nd version to branch1 branch.',233            $log->getMessage());234    }235    public function testPatchset()236    {237        if (!$this->vcs->hasFeature('patchsets')) {238            $this->markTestSkipped('cvsps is not installed');239        }240        $ps = $this->vcs->getPatchset(array('file' => 'module/file1'));241        $this->assertInstanceOf('Horde_Vcs_Patchset_Cvs', $ps);242        $sets = $ps->getPatchsets();...RcsTest.php
Source:RcsTest.php  
...75        $this->assertEquals(dirname(__FILE__) . '/repos/rcs/file1',76                            $file->getPath());77        $this->assertEquals(dirname(__FILE__) . '/repos/rcs/file1,v',78                            $file->getFullPath());79        $this->assertEquals('1.2', $file->getRevision());80        $this->assertEquals('1.1', $file->getPreviousRevision('1.2'));81        $this->assertEquals(2, $file->revisionCount());82        $this->assertEquals(array(), $file->getTags());83        $this->assertEquals(array(), $file->getBranches());84        $this->assertFalse($file->isDeleted());85        /* Test sub-directory file. */86        $file = $this->vcs->getFile('dir1/file1_1');87        $this->assertInstanceOf('Horde_Vcs_File_Rcs', $file);88        $this->assertEquals('file1_1', $file->getFileName());89        $this->assertEquals('dir1/file1_1', $file->getSourcerootPath());90        $this->assertEquals(91            dirname(__FILE__) . '/repos/rcs/dir1/file1_1',92            $file->getPath());93        $this->assertEquals(94            dirname(__FILE__) . '/repos/rcs/dir1/file1_1,v',95            $file->getFullPath());96        $this->assertEquals('1.1', $file->getRevision());97        $this->assertEquals(1, $file->revisionCount());98        $this->assertEquals(array(), $file->getTags());99        $this->assertEquals(array(), $file->getBranches());100        $this->assertFalse($file->isDeleted());101        /* Test non-existant file. */102        try {103            $dir = $this->vcs->getFile('foo');104            $this->fail('Expected Horde_Vcs_Exception');105        } catch (Horde_Vcs_Exception $e) {106        }107        /* Test unicode file. */108        $file = $this->vcs->getFile('umläüte');109        $this->assertInstanceOf('Horde_Vcs_File_Rcs', $file);110        $this->assertEquals('umläüte', $file->getFileName());111        $this->assertEquals('umläüte', $file->getSourcerootPath());112        $this->assertEquals(dirname(__FILE__) . '/repos/rcs/umläüte',113                            $file->getPath());114        $this->assertEquals(dirname(__FILE__) . '/repos/rcs/umläüte,v',115                            $file->getFullPath());116        $this->assertEquals('1.1', $file->getRevision());117        $this->assertEquals(1, $file->revisionCount());118        $this->assertEquals(array(), $file->getTags());119        $this->assertEquals(array(), $file->getBranches());120        $this->assertFalse($file->isDeleted());121    }122    public function testLog()123    {124        $logs = $this->vcs->getFile('file1')->getLog();125        $this->assertInternalType('array', $logs);126        $this->assertEquals(array('1.2', '1.1'), array_keys($logs));127        $this->assertInstanceOf('Horde_Vcs_Log_Rcs', $logs['1.2']);128        $log = $logs['1.2'];129        $this->assertEquals('1.2', $log->getRevision());130        $this->assertEquals(1322495969, $log->getDate());131        $this->assertEquals('jan', $log->getAuthor());132        $this->assertEquals('Commit 2nd version.', $log->getMessage());133        $this->assertEquals(array(), $log->getBranch());134        $this->assertEquals('+1 -1', $log->getChanges());135        $this->assertEquals(array(), $log->getTags());136        $this->assertEquals(array(), $log->getSymbolicBranches());137        $this->assertEquals(138            array('file1' => array('added' => '1', 'deleted' => '1')),139            $log->getFiles());140        $this->assertEquals(1, $log->getAddedLines());141        $this->assertEquals(1, $log->getDeletedLines());142        $log = $logs['1.1'];143        $this->assertEquals('1.1', $log->getRevision());144        $this->assertEquals(1322254390, $log->getDate());145        $this->assertEquals(146            'Add first files.',147            $log->getMessage());148        $this->assertEquals(array(), $log->getBranch());149        $this->assertEquals(array(), $log->getTags());150        $logs = $this->vcs->getFile('umläüte')->getLog();151        $this->assertInternalType('array', $logs);152        $this->assertEquals(array('1.1'), array_keys($logs));153        $this->assertInstanceOf('Horde_Vcs_Log_Rcs', $logs['1.1']);154    }155    public function testLastLog()156    {157        $log = $this->vcs158            ->getFile('file1')159            ->getLastLog();160        $this->assertInstanceof('Horde_Vcs_QuickLog_Rcs', $log);161        $this->assertEquals('1.2', $log->getRevision());162        $this->assertEquals(1322495969, $log->getDate());163        $this->assertEquals('jan', $log->getAuthor());164        $this->assertEquals('Commit 2nd version.', $log->getMessage());165    }166}...getRevision
Using AI Code Generation
1$vcs = new vcs();2$revision = $vcs->getRevision();3echo $revision;4$vcs = new vcs();5$revision = $vcs->getRevision();6echo $revision;7$vcs = new vcs();8$revision = $vcs->getRevision();9echo $revision;10$vcs = new vcs();11$revision = $vcs->getRevision();12echo $revision;13$vcs = new vcs();14$revision = $vcs->getRevision();15echo $revision;16$vcs = new vcs();17$revision = $vcs->getRevision();18echo $revision;19$vcs = new vcs();20$revision = $vcs->getRevision();21echo $revision;22$vcs = new vcs();23$revision = $vcs->getRevision();24echo $revision;25$vcs = new vcs();26$revision = $vcs->getRevision();27echo $revision;28$vcs = new vcs();29$revision = $vcs->getRevision('1.php');30echo $revision;getRevision
Using AI Code Generation
1require_once 'vcs.php';2$revision = vcs::getRevision();3echo $revision;4require_once 'vcs.php';5$revision = vcs::getRevision();6echo $revision;7require_once 'vcs.php';8$revision = vcs::getRevision();9echo $revision;10{11    public static function getRevision()12    {13        return '1';14    }15}getRevision
Using AI Code Generation
1$revision = $vcs->getRevision("1");2$files = $revision->getFiles();3$file = $files[0];4print_r($file->getLog());5$revision = $vcs->getRevision("2");6$files = $revision->getFiles();7$file = $files[0];8print_r($file->getLog());9$revision = $vcs->getRevision("3");10$files = $revision->getFiles();11$file = $files[0];12print_r($file->getLog());13$revision = $vcs->getRevision("4");14$files = $revision->getFiles();15$file = $files[0];16print_r($file->getLog());17$revision = $vcs->getRevision("5");18$files = $revision->getFiles();19$file = $files[0];20print_r($file->getLog());getRevision
Using AI Code Generation
1$dir = "/home/username/htdocs/test/";2$vcs = new vcs($dir);3$rev = $vcs->getRevision();4echo $rev;5$dir = "/home/username/htdocs/test/";6$vcs = new vcs($dir);7$rev = $vcs->getRevision();8echo $rev;9$vcs->clearCache();getRevision
Using AI Code Generation
1require_once 'VCS.php';2$backend = VCS::factory('cvs', 'test');3$backend->setRoot('/home/username/test');4$backend->setModule('test');5$backend->setUser('username');6$backend->setPass('password');7$backend->setPort('2401');8$backend->setBranch('test');9$backend->setTag('test');10$backend->setDate('2005-02-03');11$backend->setRevision('1.1');12$backend->setFile('test.php');13$backend->setDir('test');14$backend->setRecursive(true);15$backend->setVerbose(true);16$backend->setQuiet(true);getRevision
Using AI Code Generation
1$VCS = new vcs;2$VCS->getRevision("1.php", "1.1");3echo "Revision of the file is ".$VCS->revision;4$VCS = new vcs;5$VCS->getRevision("2.php", "1.1");6echo "Revision of the file is ".$VCS->revision;7$VCS = new vcs;8$VCS->getRevision("3.php", "1.1");9echo "Revision of the file is ".$VCS->revision;10$VCS = new vcs;11$VCS->getRevision("4.php", "1.1");12echo "Revision of the file is ".$VCS->revision;13$VCS = new vcs;14$VCS->getRevision("5.php", "1.1");15echo "Revision of the file is ".$VCS->revision;16$VCS = new vcs;17$VCS->getRevision("6.php", "1.1");18echo "Revision of the file is ".$VCS->revision;19$VCS = new vcs;20$VCS->getRevision("7.php", "1.1");21echo "Revision of the file is ".$VCS->revision;22$VCS = new vcs;23$VCS->getRevision("8.php", "1.1");24echo "Revision of the file is ".$VCS->revision;getRevision
Using AI Code Generation
1require_once 'vcs.php';2$vcs = new vcs();3$vcs->setWorkPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');4$vcs->setRepositoryPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');5$vcs->setRepositoryType('svn');6$vcs->setUserName('anonymous');7$vcs->setPassword('anonymous');8$vcs->setRevision('HEAD');9$revision = $vcs->getRevision();10echo $revision;11require_once 'vcs.php';12$vcs = new vcs();13$vcs->setWorkPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');14$vcs->setRepositoryPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');15$vcs->setRepositoryType('svn');16$vcs->setUserName('anonymous');17$vcs->setPassword('anonymous');18$vcs->setRevision('HEAD');19$vcs->setFile('1.php');20$revision = $vcs->getRevision();21echo $revision;22require_once 'vcs.php';23$vcs = new vcs();24$vcs->setWorkPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');25$vcs->setRepositoryPath('D:/xampp/htdocs/PHP-Web-Services/Chapter 11');26$vcs->setRepositoryType('svn');27$vcs->setUserName('anonymous');28$vcs->setPassword('anonymous');29$vcs->setRevision('HEAD');30$vcs->setFile('1.php');31$revision = $vcs->getRevision();32echo $revision;Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Execute automation tests with getRevision on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.
Test now for FreeGet 100 minutes of automation test minutes FREE!!
