<commit_before><?php
namespace Payum\OmnipayBridge\Tests\Integration;

use Omnipay\Dummy\Gateway;
use Payum\OmnipayBridge\PaymentFactory;
use Payum\Request\BinaryMaskStatusRequest;
use Payum\Request\CaptureRequest;

class PaymentTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function shouldFinishSuccessfully()
    {
        $payment = PaymentFactory::create(new Gateway());

        $captureRequest = new CaptureRequest(array(
            'amount' => 1000,
            'card' => array(
                'number' => '5555556778250000', //end zero so will be accepted
                'cvv' => 123,
                'expiryMonth' => 6,
                'expiryYear' => (new \DateTime('now + 2 year'))->format('y'),
                'firstName' => 'foo',
                'lastName' => 'bar',
            )
        ));
        
        $payment->execute($captureRequest);
        
        $statusRequest = new BinaryMaskStatusRequest($captureRequest->getModel());
        $payment->execute($statusRequest);
        
        $this->assertTrue($statusRequest->isSuccess());
    }
<commit_msg>fix test.<commit_after><?php
namespace Payum\OmnipayBridge\Tests\Integration;

use Omnipay\Dummy\Gateway;
use Payum\OmnipayBridge\PaymentFactory;
use Payum\Request\BinaryMaskStatusRequest;
use Payum\Request\CaptureRequest;

class PaymentTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function shouldFinishSuccessfully()
    {
        $payment = PaymentFactory::create(new Gateway());

        $date = new \DateTime('now + 2 year');
        
        $captureRequest = new CaptureRequest(array(
            'amount' => 1000,
            'card' => array(
                'number' => '5555556778250000', //end zero so will be accepted
                'cvv' => 123,
                'expiryMonth' => 6,
                'expiryYear' => $date->format('y'),
                'firstName' => 'foo',
                'lastName' => 'bar',
            )
        ));
        
        $payment->execute($captureRequest);
        
        $statusRequest = new BinaryMaskStatusRequest($captureRequest->getModel());
        $payment->execute($statusRequest);
        
        $this->assertTrue($statusRequest->isSuccess());
    }

{'fraction_non_alphanumeric': 0.13206713780918727, 'fraction_numerical': 0.022084805653710248, 'mean_word_length': 2.1946403385049367, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '3832675', 'n_tokens_mistral': 684, 'n_tokens_neox': 623, 'n_words': 115}