8000 Fix CS. Add a test. · symfony/symfony@190258f · GitHub
[go: up one dir, main page]

Skip to content

Commit 190258f

Browse files
committed
Fix CS. Add a test.
1 parent 1293cfe commit 190258f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpClient\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Component\HttpClient\HttpClient;
1615
use Symfony\Component\HttpClient\HttpClientTrait;
1716
use Symfony\Contracts\HttpClient\HttpClientInterface;
1817

@@ -172,4 +171,13 @@ public function testBearerOption()
172171
$this->assertSame('Bearer foobar', $options['headers']['authorization'][0]);
173172
$this->assertSame('authorization: Bearer foobar', $options['raw_headers'][0]);
174173
}
174+
175+
/**
176+
* @expectedException \Symfony\Component\HttpClient\Exception\InvalidArgumentException
177+
* @expectedExceptionMessage Option "bearer" must be string, object given.
178+
*/
179+
public function testInvalidBearerOption()
180+
{
181+
self::prepareRequest('POST', 'http://example.com', ['bearer' => new \stdClass()], HttpClientInterface::OPTIONS_DEFAULTS);
182+
}
175183
}

0 commit comments

Comments
 (0)
0