Changeset 1776

Show
Ignore:
Timestamp:
08/06/08 16:12:28 (3 months ago)
Author:
prema
Message:

Attach the receiver to the argument list (metaClass methods)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • labs/incubator/src/main/php/net/stubbles/lang/mop/stubMetaClass.php

    r1775 r1776  
    8888     * invokes a method on the given receiver with the specified arguments 
    8989     * 
     90     * Note this method attach the receiver as last argument and pass-through 
     91     * to the invoked method. 
     92     * 
    9093     * @param   stubMetaObjectProtocol  $receiver   the object which the method invoked on 
    9194     * @param   string                  $method     the name of the method 
     
    97100    { 
    98101        if ($this->hasMethod($method)) { 
     102            $arguments[] = $receiver; 
    99103            return ($this->getClass()->getMethod($method)->invokeArgs($this, $arguments)); 
    100104        } 
  • labs/incubator/src/test/php/net/stubbles/lang/mop/stubMetaClassTestCase.php

    r1773 r1776  
    8383    { 
    8484        $this->assertEquals( 
    85             $this->stubMetaClass->invokeMethod(new stubMetaObject, 'getClass')
     85            $this->stubMetaClass->invokeMethod(new stubMetaObject, 'getClass')->getFullQualifiedClassName()
    8686            'net::stubbles::lang::mop::stubMetaClass' 
    8787        );