/** * Tests that initialization from a reflection class without @Stateful * annotation won't work. * * @return void */ public function testFromInvalidReflectionClass() { // initialize the annotation aliases $aliases = array(Stateful::ANNOTATION => Stateful::__getClass()); // create the reflection class $reflectionClass = new ReflectionClass('\\stdClass', array(), $aliases); // check that the descriptor has not been initialized $this->assertNull($this->descriptor->fromReflectionClass($reflectionClass)); }