toJson() public method

Convert the object to its JSON representation.
public toJson ( integer $options ) : string
$options integer
return string
 /**
  * @depends testToArray
  */
 public function testToJson(\Krucas\Notification\NotificationsBag $bag)
 {
     $this->assertContains('"container":"test"', $bag->toJson());
     return $bag;
 }