<commit_before><?php
/**
 * DocumentModelTest class
 */

namespace Graviton\RestBundle\Tests\Model;

use Graviton\RestBundle\Model\DocumentModel;
use lapistano\ProxyObject\ProxyBuilder;

/**
 * DocumentModel test
 *
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
 * @link     http://swisscom.ch
 */
class DocumentModelTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var DocumentModel
     */
    private $sut;

    /**
     * @var RecordOriginInterface
     */
    private $testRecord;

    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     *
     * @return void
     */
    protected function setUp()
    {
        $this->testRecord = $this->getMockBuilder("\Graviton\RestBundle\Model\RecordOriginInterface")
            ->setMethods(["isRecordOriginModifiable", "getRecordOrigin"])
            ->getMock();

        $proxyBuilder = new ProxyBuilder("\Graviton\RestBundle\Model\DocumentModel");
        $this->sut = $proxyBuilder
            ->disableOriginalConstructor()
            ->setProperties(array('notModifiableOriginRecords'))
            ->setMethods(['checkIfOriginRecord'])
            ->getProxy();
    }

    /**
     * CheckIfOriginRecord test
     *
     * @param string $retContainerParam container parameter
     * @param bool   $isModifiable      can record be modified
     * @param string $recordOrigin      record origin
     *
     * @return void
     *
     * @dataProvider dataProvider
     */
    public function testCheckIfOriginRecord($retContainerParam, $isModifiable, $recordOrigin)
    {
        $this->testRecord
            ->expects($this->any())
            ->method("isRecordOriginModifiable")
            ->willReturn($isModifiable);
        $this->testRecord<commit_msg>try to fix scrutinizer issues<commit_after><?php
/**
 * DocumentModelTest class
 */

namespace Graviton\RestBundle\Tests\Model;

use Graviton\RestBundle\Model\DocumentModel;
use lapistano\ProxyObject\ProxyBuilder;

/**
 * DocumentModel test
 *
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
 * @link     http://swisscom.ch
 */
class DocumentModelTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var DocumentModel|object
     */
    private $sut;

    /**
     * @var RecordOriginInterface
     */
    private $testRecord;

    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     *
     * @return void
     */
    protected function setUp()
    {
        $this->testRecord = $this->getMockBuilder("\Graviton\RestBundle\Model\RecordOriginInterface")
            ->setMethods(["isRecordOriginModifiable", "getRecordOrigin"])
            ->getMock();

        $proxyBuilder = new ProxyBuilder("\Graviton\RestBundle\Model\DocumentModel");
        $this->sut = $proxyBuilder
            ->disableOriginalConstructor()
            ->setProperties(array('notModifiableOriginRecords'))
            ->setMethods(['checkIfOriginRecord'])
            ->getProxy();
    }

    /**
     * CheckIfOriginRecord test
     *
     * @param array  $retContainerParam container parameter
     * @param bool   $isModifiable      can record be modified
     * @param string $recordOrigin      record origin
     *
     * @return void
     *
     * @dataProvider dataProvider
     */
    public function testCheckIfOriginRecord($retContainerParam, $isModifiable, $recordOrigin)
    {
        $this->testRecord
            ->expects($this->any())
            ->method("isRecordOriginModifiable")
            ->willReturn($isModifiable);
        $this->testRecord
{'fraction_non_alphanumeric': 0.11545384417588068, 'fraction_numerical': 0.0, 'mean_word_length': 2.656015037593985, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, 'https://': 2, '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': '5214406', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1040, 'n_words': 215}