getVar() public méthode

public getVar ( $key, $default = null )
Exemple #1
0
 public function testGetSetVar()
 {
     $document = new Document();
     $this->assertSame(null, $document->getVar('foo'));
     $this->assertSame('default', $document->getVar('foo', 'default'));
     $document->setVar('foo', 'bar');
     $this->assertSame('bar', $document->getVar('foo'));
     $this->assertSame('bar', $document->getVar('foo', 'default'));
 }