/** * Test control static methods with specify class name. */ public function testControlStaticClassName() { RC::getStatic(self::SIMPLE_CLASS_NAME)->get('staticMethod')->setValue(new Value(__CLASS__)); $this->assertSame(__CLASS__, SimpleClass::staticMethod()); RC::getStatic('\\' . self::SIMPLE_CLASS_NAME)->get('staticMethod')->setValue(new Value(__FUNCTION__)); $this->assertSame(__FUNCTION__, SimpleClass::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')); }