<commit_before><?php


    namespace Fracture\Http;

    use Exception;
    use ReflectionClass;
    use PHPUnit_Framework_TestCase;


    class UploadedFileBuilderTest extends PHPUnit_Framework_TestCase
    {

        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         */
        public function test_Initialization_of_Instance( $input )
        {


            $builder = $this->getMock( 'Fracture\Http\UploadedFileBuilder', ['buildInstance'] );
            $builder->expects( $this->once() )
                    ->method( 'buildInstance' )
                    ->with( $this->equalTo( $input ) )
                    ->will( $this->returnValue( new UploadedFile( $input ) ) );


            $builder->create( $input );
        }



        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         */
        public function test_Preparation_of_Instance( $input )
        {

            $response  = $this->getMock( 'Fracture\Http\UploadedFile', ['prepare'], [ 'params' => $input ] );
            $response->expects( $this->once() )
                     ->method( 'prepare' );

            $builder = $this->getMock( 'Fracture\Http\UploadedFileBuilder', ['buildInstance'] );
            $builder->expects( $this->once() )
                    ->method( 'buildInstance' )
                    ->with( $this->equalTo( $input ) )
                    ->will( $this->returnValue( $response ) );

            $instance = $builder->create( $input );

            $this->assertInstanceOf( 'Fracture\Http\UploadedFile', $instance );
            $this->assertEquals( $response, $instance );
        }


        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         * @covers Fracture\Http\UploadedFileBuilder::createInstance
         */
        public function test_Unaltered_Builder( $input )
        {
            $builder = new UploadedFileBuilder;
            $instance = $builder->create($input);

            $this->assertInstanceOf( 'Fracture\Http\UploadedFile', $instance );
        }


        public function provide_Input()
        {
            return [<commit_msg>minor: typo in coverage notation<commit_after><?php


    namespace Fracture\Http;

    use Exception;
    use ReflectionClass;
    use PHPUnit_Framework_TestCase;


    class UploadedFileBuilderTest extends PHPUnit_Framework_TestCase
    {

        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         */
        public function test_Initialization_of_Instance( $input )
        {


            $builder = $this->getMock( 'Fracture\Http\UploadedFileBuilder', ['buildInstance'] );
            $builder->expects( $this->once() )
                    ->method( 'buildInstance' )
                    ->with( $this->equalTo( $input ) )
                    ->will( $this->returnValue( new UploadedFile( $input ) ) );


            $builder->create( $input );
        }



        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         */
        public function test_Preparation_of_Instance( $input )
        {

            $response  = $this->getMock( 'Fracture\Http\UploadedFile', ['prepare'], [ 'params' => $input ] );
            $response->expects( $this->once() )
                     ->method( 'prepare' );

            $builder = $this->getMock( 'Fracture\Http\UploadedFileBuilder', ['buildInstance'] );
            $builder->expects( $this->once() )
                    ->method( 'buildInstance' )
                    ->with( $this->equalTo( $input ) )
                    ->will( $this->returnValue( $response ) );

            $instance = $builder->create( $input );

            $this->assertInstanceOf( 'Fracture\Http\UploadedFile', $instance );
            $this->assertEquals( $response, $instance );
        }


        /**
         * @dataProvider provide_Input
         *
         * @covers Fracture\Http\UploadedFileBuilder::create
         * @covers Fracture\Http\UploadedFileBuilder::buildInstance
         */
        public function test_Unaltered_Builder( $input )
        {
            $builder = new UploadedFileBuilder;
            $instance = $builder->create($input);

            $this->assertInstanceOf( 'Fracture\Http\UploadedFile', $instance );
        }


        public function provide_Input()
        {
            return [
{'fraction_non_alphanumeric': 0.12762697022767075, 'fraction_numerical': 0.0, 'mean_word_length': 1.8574108818011257, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 57, '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': '6436834', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1209, 'n_words': 208}