Skip to content

Commit

Permalink
Merge pull request #18 from php-api-clients/php-di-5.4.3-and-6.x
Browse files Browse the repository at this point in the history
Support both PHP-DI 5.4.3+ and 6.x
  • Loading branch information
WyriHaximus authored May 9, 2018
2 parents 24cd22d + 82f1c29 commit 5b995c5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"api-clients/hydrator": "^1.0.1",
"api-clients/middleware": "^4.0 || ^3.0 || ^2.0 || ^1.1",
"api-clients/transport": "^3.0 || ^2.0 || ^1.0",
"php-di/php-di": "^5.4.3",
"php-di/php-di": "^6.0 || ^5.4.3",
"psr/container": "^1.0"
},
"require-dev": {
Expand Down
14 changes: 8 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,21 @@ public function handle($command)
$this->assertSame($command, await($client->handle($command), $loop));
}

/**
* @expectedException \DI\Definition\Exception\DefinitionException
*/
public function testCommandBusMissing()
{
new Client(ContainerBuilder::buildDevContainer());
try {
new Client(ContainerBuilder::buildDevContainer());
} catch (\DI\Definition\Exception\InvalidDefinition $exception) {
self::assertTrue(true);

return;
} catch (\DI\Definition\Exception\DefinitionException $exception) {
self::assertTrue(true);

return;
}

self::assertTrue(false);
}

public function testHydrate()
Expand Down

0 comments on commit 5b995c5

Please sign in to comment.