Skip to content

An useful tool to "include" LEGACY php files without side-effect.

License

Notifications You must be signed in to change notification settings

ackintosh/toumi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toumi

A library for including legacy php file.

Build Status

Usage

legacy.php

<?php
function hoge($arg)
{
    return 'hoge' . $arg;
}

somefunction(1234);

function fuga()
{
    $f = function () { echo 'fuga'; };
    call_user_func($f);
}

var_dump(hoge('hogehoge'));
exit;
<?php
// Only function declaration is included.
\Ackintosh\Toumi::load('legacy.php');

class LegacyTest extends PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function hoge()
    {
        $this->assertSame('hogefuga', hoge('fuga'));
    }
}

Author

Akihito Nakano

About

An useful tool to "include" LEGACY php files without side-effect.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages