Skip to content

azerborodach/putc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

putc

Helper for testing protected methods and fields

How to use

class Foo { //tested class
    protected $bla = true;
    
    protected function bar() {
        return true;
    }
}

class FooTest extends Putc { //testing class
      
    public function testBar() {
        $tested = new Foo();
        
        $this->assertTrue($this->invokeMethod($tested, 'bar')); //check protected method
        $this->assertTrue($this->invokeProperty($tested, 'bla')); //check protected field
    }
}

About

Helper for testing protected methods and fields

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages