/** * run() should update the element's style */ public function testRun_doesNotBold_ifParameterIsZero() { $style = new \Jstewmc\Rtf\Style(); $element = new B(); $element->setParameter('0'); $element->setStyle($style); $this->assertFalse($element->getStyle()->getCharacter()->getIsBold()); $element->run(); $this->assertFalse($element->getStyle()->getCharacter()->getIsBold()); return; }
<?php class A { private function foo() { static $x = null; var_dump(get_class($this), $x); $x = 1; } public function run() { $this->foo(); } } class B extends A { } class C extends A { } $a = new A(); $b = new B(); $c = new C(); $a->run(); $b->run(); $c->run();