public function JsonEncoderTest::testEncodeScalar in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/serializer/Tests/Encoder/JsonEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\JsonEncoderTest::testEncodeScalar()
File
- vendor/
symfony/ serializer/ Tests/ Encoder/ JsonEncoderTest.php, line 26
Class
Namespace
Symfony\Component\Serializer\Tests\EncoderCode
public function testEncodeScalar() {
$obj = new \stdClass();
$obj->foo = 'foo';
$expected = '{"foo":"foo"}';
$this
->assertEquals($expected, $this->encoder
->encode($obj, 'json'));
}