/** * Initializes the form processor. * * @param String $name The form name. */ public function __construct($name) { $this->_name = $name; Opf_Class::addForm($this); }
/** * @covers Opf_Class::hasForm * @depends testAddForm */ public function testHasForm() { $mock = $this->getMock('Opf_Form', array(), array('foo')); $mock->expects($this->atLeastOnce())->method('getName')->will($this->returnValue('foo')); Opf_Class::addForm($mock); $this->assertTrue(Opf_Class::hasForm('foo')); $this->assertFalse(Opf_Class::hasForm('bar')); }