<?php
//
// WARNING: Do not edit by hand, this file was generated by Crank:
// https://github.com/gocardless/crank
//

namespace GoCardlessPro\Integration;

class PayerThemesIntegrationTest extends IntegrationTestBase
{
    public function testResourceModelExists()
    {
        $obj = new \GoCardlessPro\Resources\PayerTheme(array());
        $this->assertNotNull($obj);
    }
    
    public function testPayerThemesCreateForCreditor()
    {
        $fixture = $this->loadJsonFixture('payer_themes')->create_for_creditor;
        $this->stub_request($fixture);

        $service = $this->client->payerThemes();
        $response = call_user_func_array(array($service, 'createForCreditor'), (array)$fixture->url_params);

        $body = $fixture->body->payer_themes;
    
        $this->assertInstanceOf('\GoCardlessPro\Resources\PayerTheme', $response);

        $this->assertEquals($body->id, $response->id);
    

        $expectedPathRegex = $this->extract_resource_fixture_path_regex($fixture);
        $dispatchedRequest = $this->history[0]['request'];
        $this->assertMatchesRegularExpression($expectedPathRegex, $dispatchedRequest->getUri()->getPath());
    }

    
}
