1. Go to this page and download the library: Download ignaszak/testing-tools 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/ */
ignaszak / testing-tools example snippets
use Ignaszak\TestingTools\Test;
Test::get('propertyName', $object);
use Ignaszak\TestingTools\Test;
// Set value
Test::inject('propertyName', 'new value', $object);
// Get value
Test::get('propertyName', $object);
use Ignaszak\TestingTools\Test;
// Call method with args
Test::call('method', ['arg1', 'arg2'], $object);
// Call method wthout args
Test::call('method', null, $object);
use Ignaszak\TestingTools\Test;
Test::$object = new Example();
// All these methods refers to `Example`
Test::inject('propertyName', 'new value');
Test::inject('propertyName'); // Set null
Test::get('propertyName');
Test::call('method');
Test::call('method', ['arg1', 'arg2']);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.