Registry / testing / jstewmc-test-case

jstewmc-test-case

JSON →
library2.0.0phppackagistunverified

Access private properties in unit tests

composer require jstewmc/test-case
INSTALL
IMPORT
SIG · JSTEWMC-TEST-CASE
J
jstewmc-test-case
testingphpv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestCase
use Jstewmc\TestCase\TestCase;

Extend TestCase to access private properties in unit tests.

use Jstewmc\TestCase\TestCase; class MyTest extends TestCase { public function testPrivateProperty() { $obj = new SomeClass(); $this->setPrivateProperty($obj, 'privateProp', 'value'); $this->assertEquals('value', $this->getPrivateProperty($obj, 'privateProp')); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
jstewmc-test-case — pip install jstewmc-test-case · libregistry