toDSL() public method

Get the raw DSL statements for the blueprint.
public toDSL ( Grammar $grammar ) : array
$grammar Grammar
return array
コード例 #1
0
ファイル: MapGrammarTest.php プロジェクト: sleimanx2/plastic
 /**
  * @test
  */
 public function it_adds_a_object_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->object('tags', function ($blueprint) {
         $blueprint->string('name');
     });
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['tags' => ['properties' => ['name' => ['type' => 'string']]]], $statement);
 }