aedart/testing-gst

This package is abandoned and no longer maintained. The author suggests using the aedart/athenaeum package instead.

Testing utility for custom getter setter traits

2.2.0 2018-09-08 19:45 UTC

This package is auto-updated.

Last update: 2022-02-01 12:58:34 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Deprecated - Testing-GTS

Package has been replaced by aedart/athenaeum

Utilities that allows you to test special "getter setter traits", which are found throughout many of my packages.

Contents

When to use this

If you are generating lots of getter and setter traits, which adhere to the style (or perhaps standard) that I do, then this utility can speed up a lot of your testing.

How to install

composer require aedart/testing-gst

Quick Start

Inside your test case, use the given trait and invoke the assertGetterSetterTraitMethods method:

class MyTraitTest extends Test
{

    use \Aedart\Testing\GST\GetterSetterTraitTester;

    // ... test setup not shown ... //

    /**
     * @test
     */
    public function canTestAllOfTraitsMethods()
    {
        $this->assertGetterSetterTraitMethods(
            PersonNameTrait::class,
            $this->faker->unique()->name,
            $this->faker->unique()->name
        );
    }
}

License

BSD-3-Clause, Read the LICENSE file included in this package