From c5622043a0bc113bb2956c8d83862d3e59bbfdfc Mon Sep 17 00:00:00 2001 From: Rougin Gutib Date: Fri, 12 Jan 2018 01:42:04 +0800 Subject: [PATCH] Update README.md and CHANGELOG.md --- CHANGELOG.md | 2 +- README.md | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0893c22..6cd8716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `Spark Plug` will be documented in this file. -## [0.6.0](https://github.com/rougin/spark-plug/compare/v0.5.0...v0.6.0) - 2018-01-11 +## [0.6.0](https://github.com/rougin/spark-plug/compare/v0.5.0...v0.6.0) - 2018-01-12 ### Added - `SparkPlug::instance` method (replaces `getCodeIgniter` method) diff --git a/README.md b/README.md index 1a55da1..6c02eff 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Quality Score][ico-code-quality]][link-code-quality] [![Total Downloads][ico-downloads]][link-downloads] -Returns [Codeigniter](https://codeigniter.com/) applications as single variables. Might be useful for testing frameworks such as [PHPUnit](https://phpunit.de/). +Spark Plug returns [Codeigniter](https://codeigniter.com/) applications as single variables. Might be useful for testing frameworks such as [PHPUnit](https://phpunit.de/). ## Install @@ -24,7 +24,7 @@ $ composer require rougin/spark-plug ``` php $ci = Rougin\SparkPlug\Instance::create(); -// You can now use its instance +// You can now use the CI_Controller instance $ci->load->helper('inflector'); ``` @@ -37,7 +37,6 @@ $sparkplug = SparkPlug($GLOBALS, $_SERVER); $ci = $sparkplug->instance(); -// You can now use its instance $ci->load->helper('inflector'); ``` @@ -48,10 +47,9 @@ use Rougin\SparkPlug\SparkPlug; $sparkplug = SparkPlug($GLOBALS, $_SERVER); +// Sets the value of the APPPATH constant $sparkplug->set('APPPATH', '/path/to/app'); -$sparkplug->set('VIEWPATH', '/path/to/app/views'); -// \CI_Controller $ci = $sparkplug->instance(); ``` @@ -72,7 +70,7 @@ class SampleTest extends \PHPUnit_Framework_TestCase { public function testCodeigniterInstance() { - // Path of your test application + // Directory path to the test application $application = __DIR__ . '/TestApp'; // Instance::create($path, $_SERVER, $GLOBALS) @@ -83,8 +81,6 @@ class SampleTest extends \PHPUnit_Framework_TestCase } ``` -**NOTE**: To create a mock instance, a [rougin/codeigniter](https://github.com/rougin/codeigniter) package and a test application directory are required. Kindly check the [tests](https://github.com/rougin/spark-plug/tree/master/tests) directory for more examples. - ## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.