/** * Test if method is under control. */ public function testIsUnderControlStatic() { $class = new SimpleClass(); $this->assertFalse(RC::hasStatic(self::SIMPLE_CLASS_NAME, 'staticMethod')); $this->assertFalse(RC::hasStatic($class, 'staticMethod')); RC::getStatic(self::SIMPLE_CLASS_NAME)->get('staticMethod')->setValue(new Value(__FUNCTION__)); $this->assertTrue(RC::hasStatic(self::SIMPLE_CLASS_NAME, 'staticMethod')); $this->assertTrue(RC::hasStatic($class, 'staticMethod')); }
/** * Test default behavior of synthetic class. */ public function testDefaultClassBehavior() { $class = new SimpleClass(); $this->assertSame(self::SIMPLE_CLASS_NAME . '::method', $class->method()); $this->assertSame(self::SIMPLE_CLASS_NAME . '::staticMethod', $class->staticMethod()); $this->assertFalse(RC::hasObject($class, 'method')); $this->assertFalse(RC::hasStatic(self::SIMPLE_CLASS_NAME, 'staticMethod')); }