<commit_before><?php
/**
 * ownCloud - b2sharebridge
 *
 * This file is licensed under the MIT License. See the LICENSE file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2015
 */

namespace OCA\B2shareBridge\Controller;

use PHPUnit_Framework_TestCase;

use OCP\AppFramework\Http\TemplateResponse;


class PageControllerTest extends PHPUnit_Framework_TestCase {

    private $controller;
    private $userId = 'john';

    public function setUp() {
        $request = $this->getMockBuilder('OCP\IRequest')->getMock();
        $config = $this->getMockBuilder('OCP\IConfig')->getMock();
        $mapper = $this->getMockBuilder('OCA\B2shareBridge\Db\FilecacheStatusMapper')
            ->disableOriginalConstructor()
            ->getMock();


        $this->controller = new B2shareBridge(
            'b2sharebridge', $request, $config, $mapper, $this->userId
        );
    }

    public function testIndex() {
        $result = $this->controller->index();
        $this->assertEquals(['user' => 'john', 'transfers' => Array (), 'publications' => Array (), 'fails' => Array ()], $result->getParams());
        $this->assertEquals('main', $result->getTemplateName());
        $this->assertTrue($result instanceof TemplateResponse);
    }
}<commit_msg>expand unit test to new b2sharebridge controller<commit_after><?php
/**
 * ownCloud - b2sharebridge
 *
 * This file is licensed under the MIT License. See the LICENSE file.
 *
 * @author <NAME> <<EMAIL>>
 * @copyright <NAME> 2015
 */

namespace OCA\B2shareBridge\Controller;

use PHPUnit_Framework_TestCase;

use OCP\AppFramework\Http\TemplateResponse;


class PageControllerTest extends PHPUnit_Framework_TestCase {

    private $controller;
    private $userId = 'john';

    public function setUp() {
        $request = $this->getMockBuilder('OCP\IRequest')->getMock();
        $config = $this->getMockBuilder('OCP\IConfig')->getMock();
        $mapper = $this->getMockBuilder('OCA\B2shareBridge\Db\FilecacheStatusMapper')
            ->disableOriginalConstructor()
            ->getMock();
        $scMapper = $this->getMockBuilder('OCA\B2shareBridge\Db\StatusCodeMapper')
            ->disableOriginalConstructor()
            ->getMock();
            

        $this->controller = new B2shareBridge(
            'b2sharebridge', $request, $config, $mapper, $scMapper, $this->userId
        );
    }

    public function testIndex() {
        $result = $this->controller->index();
        $this->assertEquals(['user' => 'john', 'transfers' => Array (), 'publications' => Array (), 'fails' => Array (), 'statuscodes' => Array ()], $result->getParams());
        $this->assertEquals('main', $result->getTemplateName());
        $this->assertTrue($result instanceof TemplateResponse);
    }
}
{'fraction_non_alphanumeric': 0.15334302325581395, 'fraction_numerical': 0.007267441860465116, 'mean_word_length': 3.362916006339144, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 55, 'https://': 0, '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': '3819686', 'n_tokens_mistral': 803, 'n_tokens_neox': 775, 'n_words': 161}