Skip to content

Commit

Permalink
Fix broken test in PHP 7
Browse files Browse the repository at this point in the history
  • Loading branch information
jeskew committed Jun 30, 2015
1 parent 3cccb2c commit 13b9b7a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/Exception/AwsExceptionTest.php
Expand Up @@ -81,10 +81,12 @@ public function testProvidesExceptionToStringWithNoPrevious()
{
$command = new Command('foo');
$e = new AwsException('Foo', $command);
$this->assertStringStartsWith(
"exception 'Aws\\Exception\\AwsException' with message 'Foo' in ",
$e->__toString()
);

$exceptionString = version_compare(PHP_VERSION, '7.0.0') >= 0 ?
'Aws\\Exception\\AwsException: Foo'
: "exception 'Aws\\Exception\\AwsException' with message 'Foo' in ";

$this->assertStringStartsWith($exceptionString, $e->__toString());
}

public function testProvidesExceptionToStringWithPreviousLast()
Expand Down

0 comments on commit 13b9b7a

Please sign in to comment.