Code Duplication    Length = 12-16 lines in 2 locations

tests/ApplyPromocodeToUserTest.php 1 location

@@ 75-90 (lines=16) @@
72
    }
73
74
    /** @test */
75
    public function is_returns_promocode_with_user_if_applied_successfuly()
76
    {
77
        $user = User::find(1);
78
        $this->actingAs($user);
79
80
        $promocodes = Promocodes::create();
81
        $promocode = $promocodes->first();
82
83
        $this->assertCount(1, $promocodes);
84
85
        $appliedPromocode = Promocodes::apply($promocode['code']);
86
87
        $this->assertTrue($appliedPromocode instanceof Promocode);
88
89
        $this->assertCount(1, $appliedPromocode->users);
90
    }
91
92
    /** @test */
93
    public function it_has_alias_named_reedem()

tests/CheckPromocodeValidationTest.php 1 location

@@ 60-71 (lines=12) @@
57
    }
58
59
    /** @test */
60
    public function it_returns_promocode_model_if_validation_passes()
61
    {
62
        $promocodes = Promocodes::create();
63
        $promocode = $promocodes->first();
64
65
        $this->assertCount(1, $promocodes);
66
67
        $checkPromocode = Promocodes::check($promocode['code']);
68
69
        $this->assertTrue($checkPromocode instanceof Promocode);
70
        $this->assertEquals($promocode['code'], $checkPromocode->code);
71
    }
72
}
73