Kraken\_Module\Util\Factory\FactoryTest::testCaseSimpleFactoryPlugin_RegistersItself PHP Method

testCaseSimpleFactoryPlugin_RegistersItself() public method

    public function testCaseSimpleFactoryPlugin_RegistersItself()
    {
        $std = new StdClass();
        $register = function (SimpleFactoryInterface $factory) use($std) {
            $factory->define(function () use($std) {
                return $std;
            });
        };
        $factory = $this->createSimpleFactory();
        $plugin = $this->createSimpleFactoryPlugin($register);
        $plugin->registerPlugin($factory);
        $this->assertSame($std, $factory->create());
        unset($plugin);
        unset($factory);
    }