Fix EncoderInterface::encode() return type
This commit is contained in:
parent
150d8506e4
commit
ae6f054cc1
|
@ -25,7 +25,7 @@ interface EncoderInterface
|
|||
* @param string $format Format name
|
||||
* @param array $context Options that normalizers/encoders have access to
|
||||
*
|
||||
* @return string|int|float|bool
|
||||
* @return string
|
||||
*
|
||||
* @throws UnexpectedValueException
|
||||
*/
|
||||
|
|
|
@ -67,9 +67,9 @@ class ChainEncoderTest extends TestCase
|
|||
public function testEncode()
|
||||
{
|
||||
$this->encoder1->expects($this->never())->method('encode');
|
||||
$this->encoder2->expects($this->once())->method('encode');
|
||||
$this->encoder2->expects($this->once())->method('encode')->willReturn('foo:123');
|
||||
|
||||
$this->chainEncoder->encode(['foo' => 123], self::FORMAT_2);
|
||||
$this->assertSame('foo:123', $this->chainEncoder->encode(['foo' => 123], self::FORMAT_2));
|
||||
}
|
||||
|
||||
public function testEncodeUnsupportedFormat()
|
||||
|
|
Reference in New Issue