Esempio n. 1
0
 /**
  * Test the to array function
  *
  * @return void
  * @author Dan Cox
  */
 public function test_toArray()
 {
     $tool = new ModuleTool();
     $tool->addCommand('NewCommand');
     $settings = $tool->toArray();
     $this->assertEquals(array('commands' => array('NewCommand'), 'entity' => array()), $settings);
 }
Esempio n. 2
0
 /**
  * Reads settings from the mod tool
  *
  * @return void
  * @author Dan Cox
  */
 public function readFrom($name, ModuleTool $modTool)
 {
     $this->settings = $modTool->toArray();
     $this->write($name);
 }