Scalr\Tests\Service\Aws\S3Test::testFunctionalErrorMessageShouldContainAction PHP Method

testFunctionalErrorMessageShouldContainAction() public method

    public function testFunctionalErrorMessageShouldContainAction()
    {
        $this->skipIfEc2PlatformDisabled();
        try {
            $object = $this->s3->object->create('unexistent-bucket', '- illegal name -', 'content');
            $this->assertTrue(false, 'ClientException must be thrown here.');
        } catch (ClientException $e) {
            $this->assertContains('Request AddObject failed.', $e->getMessage());
        }
    }