getMethod() публичный Метод

public getMethod ( ) : string
Результат string
Пример #1
0
 public function testCanCreateANewInstanceWithArguments()
 {
     $methodCall = new SimpleMethodCall('getUsername', null);
     $definition = new OptionalMethodCall($methodCall, new OptionalFlag(30));
     $newArguments = [$arg0 = new \stdClass()];
     $newDefinition = $definition->withArguments($newArguments);
     // Mutate arguments before reading it
     $arg0->foo = 'bar';
     $this->assertInstanceOf(OptionalMethodCall::class, $newDefinition);
     $this->assertEquals($methodCall->getCaller(), $definition->getCaller());
     $this->assertEquals(30, $definition->getPercentage());
     $this->assertEquals($methodCall->getMethod(), $definition->getMethod());
     $this->assertEquals($methodCall->getArguments(), $definition->getArguments());
     $this->assertEquals($methodCall->getCaller(), $newDefinition->getCaller());
     $this->assertEquals(30, $newDefinition->getPercentage());
     $this->assertEquals($methodCall->getMethod(), $newDefinition->getMethod());
     $this->assertEquals([StdClassFactory::create(['foo' => 'bar'])], $newDefinition->getArguments());
 }