GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#82)
by
unknown
03:34
created

FlexCheckoutPaymentRequestTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCheckoutUrl() 0 22 1
1
<?php namespace Ogone\Tests\FlexCheckout;
2
3
use GuzzleHttp\Client;
4
use Ogone\FlexCheckout\FlexCheckoutPaymentRequest;
5
use Ogone\FlexCheckout\Alias;
6
7
use Ogone\HashAlgorithm;
8
use Ogone\Passphrase;
9
use Ogone\ShaComposer\AllParametersShaComposer;
10
use Ogone\ShaComposer\ShaComposer;
11
use TestCase;
12
13
class FlexCheckoutPaymentRequestTest extends TestCase
14
{
15
	private $configuration;
16
17
	public function testCheckoutUrl()
18
	{
19
		$sha = new FakeShaComposer;
20
21
		$flex        = new FlexCheckoutPaymentRequest($sha);
22
		$alias       = new Alias("test111");
23
		$uri = "http://www.example.com";
24
25
		$flex->setPspId($this->configuration['psp_id']);
26
		$flex->setAliasId($alias);
27
		$flex->setOrderId("test20111");
28
		$flex->setPaymentMethod("CreditCard");
29
		$flex->setAccepturl($uri);
30
		$flex->setExceptionurl($uri);
31
		$flex->setShaSign();
32
		$flex->validate();
33
34
		$url = $flex->getCheckoutUrl();
35
36
		$this->assertEquals($url,
37
			"https://ogone.test.v-psp.com/Tokenization/HostedPage?ACCOUNT.PSPID=0d8ufu089ad&ALIAS.ALIASID=test111&ALIAS.ORDERID=test20111&CARD.PAYMENTMETHOD=CreditCard&PARAMETERS.ACCEPTURL=http%3A%2F%2Fwww.example.com&PARAMETERS.EXCEPTIONURL=http%3A%2F%2Fwww.example.com&SHASIGNATURE.SHASIGN=foo");
38
	}
39
}
40
41
class FakeShaComposer implements ShaComposer
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
42
{
43
    const FAKESHASTRING = 'foo';
44
45
    public function compose(array $responseParameters)
46
    {
47
        return self::FAKESHASTRING;
48
    }
49
}
50
51