public function testToJsonReturnsJson() { $entity = new EntityStub(['name' => 'Hello world']); $this->assertEquals('{"name":"Hello world"}', $entity->toJson()); }