private function xRescript(ScriptReorganizer_Type_Library $library, &$expected) { $library->load($this->source); $library->reformat(); $library->save($this->target); $this->assertTrue($expected === file_get_contents($this->target)); }
* http://pear.php.net/package/ScriptReorganizer 0.4.0 alpha - Packed Library * * PHP version 5 * * Copyright (C) 2005 Stefano F. Rausch <*****@*****.**> * * LICENSE: This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) any * later version. */ HEADER; $library = new ScriptReorganizer_Type_Library( new ScriptReorganizer_Strategy_Pack ); /* * Normally, this would be the standard way of instantiating a library type object, * just swap ScriptReorganizer_Type_Script with ScriptReorganizer_Type_Library. */ $script = new ScriptReorganizer_Type_Decorator_AddHeader( new ScriptReorganizer_Type_Script( new ScriptReorganizer_Strategy_Pack( true ) ) ); $path = realpath( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR; // do the job ... ;) try {