Example #1
0
 /** @test */
 public function itShouldBeTypeStaticMethod()
 {
     $r = new Reflector(__CLASS__ . '::staticTestMethod');
     $this->assertTrue($r->isMethod());
     $this->assertTrue($r->isStaticMethod());
     $rf = $r->getReflector();
     $res = $rf->invokeArgs($this, $args = [1, 2]);
     $this->assertSame($res, $args);
     $r = new Reflector([__CLASS__, 'staticTestMethod']);
     $this->assertTrue($r->isMethod());
     $this->assertTrue($r->isStaticMethod());
     $rf = $r->getReflector();
     $res = $rf->invokeArgs($this, $args = [3, 4]);
     $this->assertSame($res, $args);
 }