diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0925d33 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/examples/ export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore diff --git a/.travis.yml b/.travis.yml index 7c16234..0a5430e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,5 @@ language: php -php: -# - 5.3 # requires old distro, see below - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - hhvm # ignore errors, see below - # lock distro so new future defaults will not break the build dist: trusty @@ -18,8 +7,17 @@ matrix: include: - php: 5.3 dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4 + - php: hhvm-3.18 allow_failures: - - php: hhvm + - php: hhvm-3.18 sudo: false diff --git a/composer.json b/composer.json index 3b7fc4a..99722cd 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,9 @@ "autoload": { "psr-4": { "Clue\\React\\Soap\\": "src/" } }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Soap\\": "tests/" } + }, "require": { "php": ">=5.3", "clue/buzz-react": "^2.5", @@ -22,6 +25,6 @@ }, "require-dev": { "clue/block-react": "^1.0", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f373698..bd304c3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,6 @@ - + ./tests/ diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 160fe9e..c97369d 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -1,5 +1,7 @@ loop = React\EventLoop\Factory::create(); + $this->loop = \React\EventLoop\Factory::create(); $this->client = new Client(new Browser($this->loop), self::$wsdl); } @@ -58,7 +60,7 @@ public function testBlzServiceWithClassmapReturnsExpectedType() { $this->client = new Client(new Browser($this->loop), self::$wsdl, array( 'classmap' => array( - 'getBankResponseType' => 'BankResponse' + 'getBankResponseType' => 'Clue\Tests\React\Soap\BankResponse' ) )); @@ -71,7 +73,7 @@ public function testBlzServiceWithClassmapReturnsExpectedType() $result = Block\await($promise, $this->loop); - $this->assertInstanceOf('BankResponse', $result); + $this->assertInstanceOf('Clue\Tests\React\Soap\BankResponse', $result); $this->assertTrue(isset($result->details)); $this->assertTrue(isset($result->details->bic)); } @@ -107,7 +109,7 @@ public function testBlzServiceNonWsdlModeReturnedWithoutOuterResultStructure() // try encoding the "blz" parameter with the correct namespace (see uri) // $promise = $api->getBank(new SoapParam('12070000', 'ns1:blz')); - $promise = $api->getBank(new SoapVar('12070000', XSD_STRING, null, null, 'blz', 'http://thomas-bayer.com/blz/')); + $promise = $api->getBank(new \SoapVar('12070000', XSD_STRING, null, null, 'blz', 'http://thomas-bayer.com/blz/')); $result = Block\await($promise, $this->loop); diff --git a/tests/ProxyTest.php b/tests/ProxyTest.php index 9081cc1..40498fe 100644 --- a/tests/ProxyTest.php +++ b/tests/ProxyTest.php @@ -1,5 +1,7 @@