<commit_before><?php
/**
 * B2SHAREBRIDGE
 *
 * PHP Version 7
 *
 * @category  Nextcloud
 * @package   B2shareBridge
 * @author    EUDAT <<EMAIL>>
 * @copyright 2015 EUDAT
 * @license   AGPL3 https://github.com/EUDAT-B2DROP/b2sharebridge/blob/master/LICENSE
 * @link      https://github.com/EUDAT-B2DROP/b2sharebridge.git
 */

namespace OCA\B2shareBridge\ests\Settings;

use OCP\IURLGenerator;
use OCP\IL10N;
use PHPUnit\Framework\TestCase;

class SectionTest extends TestCase
{
    /**
     * @var \OCA\B2shareBridge\Settings\Section 
     */
    private $_section;
    /**
     * @var  IURLGenerator|\PHPUnit_Framework_MockObject_MockObject 
     */
    private $_urlGenerator;

    /**
     *  @var IL10N|\PHPUnit_Framework_MockObject_MockObject 
     */
	private $_l10n;

    public function setUp() 
    {
        $this->_urlGenerator = $this->createMock(IURLGenerator::class);
        $this->_l10n = $this->createMock(IL10N::class);
        $this->_section = new \OCA\B2shareBridge\Settings\AdminSection($this->_urlGenerator, $this->_l10n);

        return parent::setUp();
    }

    public function testGetId() 
    {
        $this->assertSame('b2sharebridge', $this->_section->getID());
    }

    public function testGetName() 
    {
        $this->assertSame('EUDAT', $this->_section->getName());
    }

    public function testGetPriority() 
    {
        $this->assertSame(75, $this->_section->getPriority());
    }

    public function testGetIcon() 
    {
        $this->urlGenerator
            ->expects($this->once())
            ->method('imagePath')
            ->with('b2sharebridge', 'eudat_logo.png')
            ->willReturn('/apps/b2sharebridge/eudat_logo.png');
        $this->assertSame('/apps/b2sharebridge/eudat_logo.png', $this->section->getIcon());
    }
}<commit_msg>Update private vars in GetIcon test<commit_after><?php
/**
 * B2SHAREBRIDGE
 *
 * PHP Version 7
 *
 * @category  Nextcloud
 * @package   B2shareBridge
 * @author    EUDAT <<EMAIL>>
 * @copyright 2015 EUDAT
 * @license   AGPL3 https://github.com/EUDAT-B2DROP/b2sharebridge/blob/master/LICENSE
 * @link      https://github.com/EUDAT-B2DROP/b2sharebridge.git
 */

namespace OCA\B2shareBridge\ests\Settings;

use OCP\IURLGenerator;
use OCP\IL10N;
use PHPUnit\Framework\TestCase;

class SectionTest extends TestCase
{
    /**
     * @var \OCA\B2shareBridge\Settings\Section 
     */
    private $_section;
    /**
     * @var  IURLGenerator|\PHPUnit_Framework_MockObject_MockObject 
     */
    private $_urlGenerator;

    /**
     *  @var IL10N|\PHPUnit_Framework_MockObject_MockObject 
     */
	private $_l10n;

    public function setUp() 
    {
        $this->_urlGenerator = $this->createMock(IURLGenerator::class);
        $this->_l10n = $this->createMock(IL10N::class);
        $this->_section = new \OCA\B2shareBridge\Settings\AdminSection($this->_urlGenerator, $this->_l10n);

        return parent::setUp();
    }

    public function testGetId() 
    {
        $this->assertSame('b2sharebridge', $this->_section->getID());
    }

    public function testGetName() 
    {
        $this->assertSame('EUDAT', $this->_section->getName());
    }

    public function testGetPriority() 
    {
        $this->assertSame(75, $this->_section->getPriority());
    }

    public function testGetIcon() 
    {
        $this->_urlGenerator
            ->expects($this->once())
            ->method('imagePath')
            ->with('b2sharebridge', 'eudat_logo.png')
            ->willReturn('/apps/b2sharebridge/eudat_logo.png');
        $this->assertSame('/apps/b2sharebridge/eudat_logo.png', $this->_section->getIcon());
    }
}
{'fraction_non_alphanumeric': 0.14798453892876864, 'fraction_numerical': 0.018221976808393152, 'mean_word_length': 2.846072186836518, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 57, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2120011', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1173, 'n_words': 171}