addTable() public method

Add a table.
public addTable ( string $key ) : TomlBuilder
$key string Tablename. Dot character have a special meant.
return TomlBuilder
コード例 #1
0
ファイル: TomlBuilderTest.php プロジェクト: ezzatron/Toml
 public function testTableWhitespace()
 {
     $tb = new TomlBuilder();
     $result = $tb->addTable('valid key')->getTomlString();
     $this->assertNotNull(Toml::Parse($result));
 }
コード例 #2
0
 /**
  * @expectedException \Yosymfony\Toml\Exception\DumpException
  */
 public function testNonStringTable()
 {
     $tb = new TomlBuilder();
     $result = $tb->addTable(2)->getTomlString();
 }