<commit_before><?php

namespace Omnipay\PayPal\Message;

use DateTime;
use Omnipay\Tests\TestCase;

class GetExpressCheckoutDetailsResponseTest extends TestCase
{
    public function testConstruct()
    {
        // response should decode URL format data
        $response = new GetExpressCheckoutDetailsResponse($this->getMockRequest(), 'example=value&foo=bar');

        $this->assertEquals(array('example' => 'value', 'foo' => 'bar'), $response->getData());
    }

    public function testGetDetailsSuccess()
    {
        $httpResponse = $this->getMockHttpResponse('GetExpressCheckoutDetailsSuccess.txt');
        $request = $this->getMockRequest();
        $request->shouldReceive('getTestMode')->once()->andReturn(true);
        $response = new GetExpressCheckoutDetailsResponse($request, $httpResponse->getBody());

        $this->assertTrue($response->isSuccessful());
        $this->assertSame(0, $response->getCode());<commit_msg>Remove testMode mock. Not sure why it was there.<commit_after><?php

namespace Omnipay\PayPal\Message;

use DateTime;
use Omnipay\Tests\TestCase;

class GetExpressCheckoutDetailsResponseTest extends TestCase
{
    public function testConstruct()
    {
        // response should decode URL format data
        $response = new GetExpressCheckoutDetailsResponse($this->getMockRequest(), 'example=value&foo=bar');

        $this->assertEquals(array('example' => 'value', 'foo' => 'bar'), $response->getData());
    }

    public function testGetDetailsSuccess()
    {
        $httpResponse = $this->getMockHttpResponse('GetExpressCheckoutDetailsSuccess.txt');
        $request = $this->getMockRequest();
        $response = new GetExpressCheckoutDetailsResponse($request, $httpResponse->getBody());

        $this->assertTrue($response->isSuccessful());
        $this->assertSame(0, $response->getCode());
{'fraction_non_alphanumeric': 0.13897937024972856, 'fraction_numerical': 0.0010857763300760044, 'mean_word_length': 4.373177842565598, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7488893', 'n_tokens_mistral': 493, 'n_tokens_neox': 491, 'n_words': 94}