/** * Tests the compareNotifyContext method of the Observer class */ public function testCompareNotifyContext() { // Create observer passing in notification method and context $observer = new Observer('observerTestMethod', $this); $negTestObj = new stdClass(); // test assertions $this->assertTrue($observer->compareNotifyContext($negTestObj) == false, "Expecting observer->compareNotifyContext(negTestObj) == false"); $this->assertTrue($observer->compareNotifyContext($this) == true, "Expecting observer->compareNotifyContext(this) == true"); }