Skip to content

Commit

Permalink
Add response test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
odan authored and odan committed Nov 17, 2021
1 parent 8157707 commit ebb676b
Show file tree
Hide file tree
Showing 18 changed files with 359 additions and 37 deletions.
23 changes: 23 additions & 0 deletions tests/Response/Client/CheckSwissPassValidityNotOkTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CheckSwissPassValidityNotOkTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(
__DIR__ . '/../../Resources/Response/Client/CheckSwissPassValidityNotOkResponse.xml'
);

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/CheckSwissPassValidityTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CheckSwissPassValidityTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/CheckSwissPassValidityResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/ConfirmReceiptTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class ConfirmReceiptTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/ConfirmReceiptResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/CreateOffersTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CreateOffersTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/CreateOffersResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/CreateReceiptsTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CreateReceiptsTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/CreateReceiptsResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/CreateServiceTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CreateServiceTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/CreateServiceResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/LoginTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class LoginTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/LoginResponse.json');

parent::__construct(200, [], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/PurchaseServiceTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class PurchaseServiceTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/PurchaseServiceResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/Client/SearchPartnerTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\Client;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SearchPartnerTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/Client/SearchPartnerResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/CreateSavOffersTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class CreateSavOffersTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/CreateSavOffersResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/SavConfirmReceiptTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SavConfirmReceiptTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/ConfirmReceiptsResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/SavCreateReceiptsTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SavCreateReceiptsTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/CreateReceiptsResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/SavCreateServiceTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SavCreateServiceTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/CreateServiceResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/SavPurchaseServiceTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SavPurchaseServiceTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/PurchaseServiceResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
21 changes: 21 additions & 0 deletions tests/Response/SAV/SavSearchServicesTestResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace OrcaServices\NovaApi\Test\Response\SAV;

use GuzzleHttp\Psr7\Response;

/**
* Response.
*/
final class SavSearchServicesTestResponse extends Response
{
/**
* The constructor.
*/
public function __construct()
{
$body = (string)file_get_contents(__DIR__ . '/../../Resources/Response/SAV/SearchServicesResponse.xml');

parent::__construct(200, ['Content-Type' => 'text/xml'], $body);
}
}
Loading

0 comments on commit ebb676b

Please sign in to comment.