public function test_to_json_include_root() { ActiveRecord\JsonSerializer::$include_root = true; $this->assert_not_null(json_decode(Book::find(1)->to_json())->book); }
public function testToJsonIncludeRoot() { ActiveRecord\JsonSerializer::$includeRoot = true; $this->assertNotNull(json_decode(Book::find(1)->toJson())->book); }