getAttributesFromFrontmatter() public méthode

e.g: (YAML syntax) --- name: "Victor" ---
public getAttributesFromFrontmatter ( string $value ) : array
$value string Frontmatter
Résultat array Array with two elements: "attributes" and "content"
    public function testGetAttributesFromEmptyJsonFrontmatter()
    {
        $parser = new AttributeParser(AttributeParser::PARSER_JSON);
        $raw = <<<FRONTMATTER
---
---
My content
FRONTMATTER;
        $attributes = $parser->getAttributesFromFrontmatter($raw);
        $content = $parser->getContentFromFrontmatter($raw);
        $this->assertTrue(is_array($attributes));
        $this->assertEquals('My content', $content);
    }
    public function testJsonFrontmatterAndAttributeValueWithTripeDashInValue()
    {
        $parser = new AttributeParser(AttributeParser::PARSER_JSON);
        $raw = <<<'FRONTMATTER'
---
{
    "foo": "bar---baz"
}
---
My content
FRONTMATTER;
        $attributes = $parser->getAttributesFromFrontmatter($raw);
        $content = $parser->getContentFromFrontmatter($raw);
        $this->assertEquals('bar---baz', $attributes['foo']);
        $this->assertEquals('My content', $content);
    }