Skip to content

Commit 05ba88a

Browse files
authored
Merge pull request #542 from simonschaufi/move-tests-to-root
Move tests into root folder and exclude them from packaging
2 parents 8c1ede1 + e8faab8 commit 05ba88a

67 files changed

Lines changed: 106 additions & 93 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.* export-ignore
2+
/Tests export-ignore
3+
/DEVELOPER-GUIDE.md export-ignore
4+
/phplint.sh export-ignore
5+
/phpunit.xml.dist export-ignore
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

3-
namespace Tests\Fhp;
3+
namespace Fhp\Tests;
4+
5+
use Psr\Log\AbstractLogger;
46

57
/**
68
* A logger that prints log messages to the console (just PHP `echo`). This class is designed to be used only for
79
* testing purposes.
810
*/
9-
class CLILogger extends \Psr\Log\AbstractLogger
11+
class CLILogger extends AbstractLogger
1012
{
1113
public function log($level, $message, array $context = []): void
1214
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests\Fhp;
3+
namespace Fhp\Tests;
44

55
use Fhp\Connection;
66
use Fhp\FinTs;

lib/Tests/Fhp/Action/SendSEPATransferTest.php renamed to Tests/Unit/Action/SendSEPATransferTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Tests\Fhp\Action;
3+
namespace Fhp\Tests\Unit\Action;
44

55
use Fhp\Protocol\Message;
66
use Fhp\Syntax\Serializer;
7-
use Tests\Fhp\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
7+
use Fhp\Tests\Unit\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
88

99
class SendSEPATransferTest extends DKBSendSEPATransferTest
1010
{

lib/Tests/Fhp/BaseActionTanSerializationTest.php renamed to Tests/Unit/BaseActionTanSerializationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Fhp;
3+
namespace Fhp\Tests\Unit;
44

5-
use Tests\Fhp\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
5+
use Fhp\Tests\Unit\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
66

77
class BaseActionTanSerializationTest extends DKBSendSEPATransferTest
88
{

lib/Tests/Fhp/BaseActionVopSerializationTest.php renamed to Tests/Unit/BaseActionVopSerializationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Fhp;
3+
namespace Fhp\Tests\Unit;
44

5-
use Tests\Fhp\Integration\Atruvia\SendTransferVoPTest;
5+
use Fhp\Tests\Unit\Integration\Atruvia\SendTransferVoPTest;
66

77
class BaseActionVopSerializationTest extends SendTransferVoPTest
88
{
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/** @noinspection PhpUndefinedClassInspection */
33

4-
namespace Tests\Fhp;
4+
namespace Fhp\Tests\Unit;
55

66
use Fhp\Connection;
77
use Fhp\Options\Credentials;
88
use Fhp\Options\FinTsOptions;
99
use Fhp\Segment\HNHBK\HNHBKv3;
10+
use Fhp\Tests\FinTsPeer;
1011
use PHPUnit\Framework\MockObject\MockObject;
1112
use PHPUnit\Framework\TestCase;
1213

@@ -73,7 +74,7 @@ protected function setUpConnection()
7374

7475
// Grab the next expected request and its mock response.
7576
$this->assertNotEmpty($this->expectedMessages, "Expected no more requests, but got: $request");
76-
list($expectedRequest, $mockResponse) = array_shift($this->expectedMessages);
77+
[$expectedRequest, $mockResponse] = array_shift($this->expectedMessages);
7778

7879
// Check that the request matches the expectation.
7980
if (strlen($expectedRequest) > 0 && !str_starts_with($expectedRequest, 'HNHBK')) {

lib/Tests/Fhp/Integration/Atruvia/AtruviaIntegrationTestBase.php renamed to Tests/Unit/Integration/Atruvia/AtruviaIntegrationTestBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Tests\Fhp\Integration\Atruvia;
3+
namespace Fhp\Tests\Unit\Integration\Atruvia;
44

55
use Fhp\Model\SEPAAccount;
6-
use Tests\Fhp\FinTsTestCase;
6+
use Fhp\Tests\Unit\FinTsTestCase;
77

88
class AtruviaIntegrationTestBase extends FinTsTestCase
99
{

lib/Tests/Fhp/Integration/Atruvia/SendTransferVoPTest.php renamed to Tests/Unit/Integration/Atruvia/SendTransferVoPTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests\Fhp\Integration\Atruvia;
3+
namespace Fhp\Tests\Unit\Integration\Atruvia;
44

55
use Fhp\Action\SendSEPATransfer;
66
use Fhp\Model\VopVerificationResult;

lib/Tests/Fhp/Integration/Consors/ConsorsIntegrationTestBase.php renamed to Tests/Unit/Integration/Consors/ConsorsIntegrationTestBase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Tests\Fhp\Integration\Consors;
3+
namespace Fhp\Tests\Unit\Integration\Consors;
44

55
use Fhp\Model\SEPAAccount;
6-
use Tests\Fhp\FinTsPeer;
7-
use Tests\Fhp\FinTsTestCase;
6+
use Fhp\Tests\FinTsPeer;
7+
use Fhp\Tests\Unit\FinTsTestCase;
88

99
class ConsorsIntegrationTestBase extends FinTsTestCase
1010
{

0 commit comments

Comments
 (0)