Code Duplication    Length = 15-17 lines in 2 locations

tests/Connection/ClientTest.php 2 locations

@@ 498-512 (lines=15) @@
495
        ], $request);
496
    }
497
498
    public function testNotifyActionWithCategories()
499
    {
500
        $history = new History();
501
        $this->client->getEmitter()->attach($history);
502
503
        $this->subscriber->addResponse(new Response(200, [], new Stream(fopen('data://text/plain,[]', 'r'))));
504
        $this->client->notifyAction('12345', 'LOGIN', null, ['foo', 'bar']);
505
        $contents = $history->getLastRequest()->getBody()->__toString();
506
        $request = json_decode($contents, true);
507
        $this->assertEquals([
508
            'userId' => '12345',
509
            'actionCode' => 'LOGIN',
510
            'categories' => ['foo', 'bar']
511
        ], $request);
512
    }
513
514
    public function testNotifySeveralActionsAsString()
515
    {
@@ 514-530 (lines=17) @@
511
        ], $request);
512
    }
513
514
    public function testNotifySeveralActionsAsString()
515
    {
516
        $history = new History();
517
        $this->client->getEmitter()->attach($history);
518
519
        $this->subscriber->addResponse(new Response(200, [], new Stream(fopen('data://text/plain,[]', 'r'))));
520
        $this->client->notifySeveralActions('12345', ['LOGIN', 'SIGNUP']);
521
        $contents = $history->getLastRequest()->getBody()->__toString();
522
        $request = json_decode($contents, true);
523
        $this->assertEquals([
524
            'userId' => '12345',
525
            'actions' => [
526
                ['actionCode' => 'LOGIN'],
527
                ['actionCode' => 'SIGNUP'],
528
            ]
529
        ], $request);
530
    }
531
532
    public function testNotifySeveralActionsAsActionClass()
533
    {