updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -9,9 +9,11 @@
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Gitonomy\Git\Tests;
use Gitonomy\Git\Commit;
use Gitonomy\Git\Exception\ReferenceNotFoundException;
use Gitonomy\Git\Log;
use Gitonomy\Git\Revision;
@@ -24,23 +26,24 @@ class RevisionTest extends AbstractTest
{
$revision = $repository->getRevision(self::LONGFILE_COMMIT.'^');
$this->assertTrue($revision instanceof Revision, 'Revision object type');
$this->assertInstanceOf(Revision::class, $revision, 'Revision object type');
$commit = $revision->getCommit();
$this->assertTrue($commit instanceof Commit, 'getCommit returns a Commit');
$this->assertInstanceOf(Commit::class, $commit, 'getCommit returns a Commit');
$this->assertEquals(self::BEFORE_LONGFILE_COMMIT, $commit->getHash(), 'Resolution is correct');
}
/**
* @dataProvider provideFoobar
* @expectedException Gitonomy\Git\Exception\ReferenceNotFoundException
* @expectedExceptionMessage Can not find revision "non-existent-commit"
*/
public function testGetFailingReference($repository)
{
$revision = $repository->getRevision('non-existent-commit')->getCommit();
$this->expectException(ReferenceNotFoundException::class);
$this->expectExceptionMessage('Can not find revision "non-existent-commit"');
$repository->getRevision('non-existent-commit')->getCommit();
}
/**
@@ -52,9 +55,9 @@ class RevisionTest extends AbstractTest
$log = $revision->getLog(null, 2, 3);
$this->assertTrue($log instanceof Log, 'Log type object');
$this->assertInstanceOf(Log::class, $log, 'Log type object');
$this->assertEquals(2, $log->getOffset(), 'Log offset is passed');
$this->assertEquals(3, $log->getLimit(), 'Log limit is passed');
$this->assertEquals(array($revision), $log->getRevisions()->getAll(), 'Revision is passed');
$this->assertEquals([$revision], $log->getRevisions()->getAll(), 'Revision is passed');
}
}