Code Duplication    Length = 20-22 lines in 2 locations

tests/unit/GigyaTest.php 2 locations

@@ 542-561 (lines=20) @@
539
        static::assertSame($gigyaResponse, $result);
540
    }
541
542
    public function testSettingOptionsAsPartOfTheQuery()
543
    {
544
        $gigyaResponse = $this->setupCall(
545
            'accounts.getAccountInfo',
546
            'https://accounts.eu1.gigya.com/accounts.getAccountInfo',
547
            [
548
                'auth'        => 'gigya',
549
                'verify'      => $this->certPath,
550
                'form_params' => [
551
                    'params' => 'passedThrough',
552
                ],
553
                'custom'      => 'value',
554
            ]
555
        );
556
        $client = $this->createClient();
557
558
        $result = $client->accounts()->getAccountInfo(['params' => 'passedThrough'], ['custom' => 'value']);
559
560
        static::assertSame($gigyaResponse, $result);
561
    }
562
563
    public function testSettingGlobalAndRequestOptionsTheRequestOptionsOverrideGlobalOptions()
564
    {
@@ 563-584 (lines=22) @@
560
        static::assertSame($gigyaResponse, $result);
561
    }
562
563
    public function testSettingGlobalAndRequestOptionsTheRequestOptionsOverrideGlobalOptions()
564
    {
565
        $gigyaResponse = $this->setupCall(
566
            'accounts.getAccountInfo',
567
            'https://accounts.eu1.gigya.com/accounts.getAccountInfo',
568
            [
569
                'auth'        => 'gigya',
570
                'verify'      => $this->certPath,
571
                'form_params' => [
572
                    'params' => 'passedThrough',
573
                ],
574
                'custom'      => 'value',
575
            ]
576
        );
577
        $client = $this->createClient();
578
579
        $client->addOption('custom', 'notUsed');
580
581
        $result = $client->accounts()->getAccountInfo(['params' => 'passedThrough'], ['custom' => 'value']);
582
583
        static::assertSame($gigyaResponse, $result);
584
    }
585
586
    public function testSettingRequestOptionsDoOverrideTheParams()
587
    {