PHP code example of kodeas / publicise

1. Go to this page and download the library: Download kodeas/publicise library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kodeas / publicise example snippets


use Kodeas\Publicise\WithPublicise;
use PHPUnit\Framework\TestCase;

class PubliciseTest extends TestCase
{
    use WithPublicise;
}


/** @test */
public function can_call_private_method()
{
    $publicisedClass = $this->publicise(new YourClass());

    $publicisedClass->privateMethod();
}