Code Duplication    Length = 12-12 lines in 3 locations

tests/unit/ValidatorTest.php 3 locations

@@ 76-87 (lines=12) @@
73
		}
74
	}
75
76
	public function testCheckReturnUrl()
77
	{
78
		Validator::checkReturnUrl('https://example.com');
79
80
		try {
81
			Validator::checkReturnUrl('https://example.com/' . implode('-', array_fill(0, 100, 'long')));
82
			$this->fail();
83
84
		} catch (\InvalidArgumentException $e) {
85
			$this->assertSame('ReturnUrl can have maximum of 300 characters.', $e->getMessage());
86
		}
87
	}
88
89
	public function testDescription()
90
	{
@@ 89-100 (lines=12) @@
86
		}
87
	}
88
89
	public function testDescription()
90
	{
91
		Validator::checkDescription('foo description');
92
93
		try {
94
			Validator::checkDescription(implode(' ', array_fill(0, 60, 'very')) . ' long description');
95
			$this->fail();
96
97
		} catch (\InvalidArgumentException $e) {
98
			$this->assertSame('Description can have maximum of 255 characters.', $e->getMessage());
99
		}
100
	}
101
102
	public function testMerchantData()
103
	{
@@ 102-113 (lines=12) @@
99
		}
100
	}
101
102
	public function testMerchantData()
103
	{
104
		Validator::checkMerchantData('foo merchant data');
105
106
		try {
107
			Validator::checkMerchantData(implode(' ', array_fill(0, 60, 'very')) . ' long merchantData');
108
			$this->fail();
109
110
		} catch (\InvalidArgumentException $e) {
111
			$this->assertSame('MerchantData can have maximum of 255 characters in encoded state.', $e->getMessage());
112
		}
113
	}
114
115
	public function testCustomerId()
116
	{