100+ results for 'php dirname'

Not the results you expected?

Settings.php (https://gitlab.com/team_fsn/fsn-php) PHP · 387 lines

22 * @package PHPExcel_Settings

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.8.0, 2014-03-02

33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');

34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

35 }

36

118 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management

119 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

120 * @return boolean Success or failure

121 */

137 * @return string Name of the Zip handler Class that PHPExcel is configured to use

138 * for Zip file management

139 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

140 */

141 public static function getZipClass()

inline-javascript-imports.py (https://bitbucket.org/ultra_iter/qt-vtl.git) Python · 81 lines

75 # modified resource files.

76 if sys.platform == 'darwin':

77 outputDirName = os.path.dirname(outputFileName)

78 os.utime(outputDirName, None)

background_test.php (https://github.com/proyectoalba/alba.git) PHP · 346 lines

10 */

11

12 require_once dirname( __FILE__ ) . '/test_case.php';

13

14 /**

136 $filename = $this->tempDir . __FUNCTION__ . '.svg';

137

138 $chart = new ezcGraphPieChart();

139 $chart->data['sample'] = new ezcGraphArrayDataSet( array(

140 'Mozilla' => 4375,

187 $filename = $this->tempDir . __FUNCTION__ . '.svg';

188

189 $chart = new ezcGraphPieChart();

190 $chart->data['sample'] = new ezcGraphArrayDataSet( array(

191 'Mozilla' => 4375,

graph.test.php (https://github.com/kwijibo/sparql-proxy.git) PHP · 308 lines

1 <?php

2 require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'constants.inc.php';

3 require_once MORIARTY_DIR . 'graph.class.php';

4 require_once MORIARTY_TEST_DIR . 'fakecredentials.class.php';

5

6 class GraphTest extends PHPUnit_Framework_TestCase {

10 <cs:subjectOfChange rdf:nodeID="a" />

11 <cs:creatorName>Ian</cs:creatorName>

12 <cs:changeReason>PHP Client Test</cs:changeReason>

13 </rdf:Description>

14 </rdf:RDF>';

file_handling_over_ftp.php (https://github.com/ameximes/akelos.git) PHP · 291 lines

1 <?php

2

3 //

6 if(!defined('AK_UPLOAD_FILES_USING_FTP')){

7 if(!function_exists('ftp_connect')){

8 echo "PHP is not compiled with FTP support\n";

9 return;

10 }

20 }

21

22 require_once(dirname(__FILE__).'/../config.php');

23

24 class FileHandlingOverFtp_TestCase extends ActiveSupportUnitTest

sfValidatorBaseTest.php (https://github.com/bheneka/gitta.git) PHP · 246 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

12

13 $t = new lime_test(47);

PropelTableComparator.php (https://github.com/apinstein/Propel.git) PHP · 312 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . '/../Table.php';

12 require_once dirname(__FILE__) . '/PropelTableDiff.php';

13 require_once dirname(__FILE__) . '/PropelColumnComparator.php';

14 require_once dirname(__FILE__) . '/PropelColumnDiff.php';

15 require_once dirname(__FILE__) . '/PropelIndexComparator.php';

16 require_once dirname(__FILE__) . '/PropelForeignKeyComparator.php';

LinodeCommandTest.php (https://bitbucket.org/hampel/linode.git) PHP · 288 lines

1 <?php namespace Hampel\Linode\Commands;

2

3 use Mockery;

6 use GuzzleHttp\Subscriber\Mock;

7

8 class LinodeCommandTest extends \PHPUnit_Framework_TestCase

9 {

10 protected $linode;

27 protected function getMockPath()

28 {

29 return dirname(__FILE__) . DIRECTORY_SEPARATOR . "mock" . DIRECTORY_SEPARATOR;

30 }

31

BaseTest.php (https://github.com/maintainable/framework.git) PHP · 325 lines

1 <?php

2 /**

3 * @category Mad

5 * @subpackage UnitTests

6 * @copyright (c) 2007-2009 Maintainable Software, LLC

7 * @license http://opensource.org/licenses/bsd-license.php BSD

8 */

9

13 if (!defined('MAD_ENV')) define('MAD_ENV', 'test');

14 if (!defined('MAD_ROOT')) {

15 require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))).'/config/environment.php';

16 }

17

24 * @subpackage UnitTests

25 * @copyright (c) 2007-2009 Maintainable Software, LLC

26 * @license http://opensource.org/licenses/bsd-license.php BSD

27 */

28 class Mad_Model_Serializer_BaseTest extends Mad_Test_Unit

SortedSet.php (https://github.com/netweaver/Rediska.git) PHP · 335 lines

1 <?php

2

3 // Require Rediska

4 require_once dirname(__FILE__) . '/../../Rediska.php';

5

6 /**

12 * @version @package_version@

13 * @link http://rediska.geometria-lab.net

14 * @license http://www.opensource.org/licenses/bsd-license.php

15 */

16 class Rediska_Key_SortedSet extends Rediska_Key_Abstract implements IteratorAggregate, ArrayAccess, Countable

sfValidatorDateTest.php (https://github.com/frhumanes/PLM.git) PHP · 246 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

12

13 $t = new lime_test(52);

Filesystem.php (https://gitlab.com/pthapa81/MeroSaaman-1.0) PHP · 573 lines

1 <?php

2

3 namespace League\Flysystem;

312 * Delete a directory.

313 *

314 * @param string $dirname path to directory

315 *

316 * @return bool success boolean

318 public function deleteDir($dirname)

319 {

320 $dirname = Util::normalizePath($dirname);

321

322 if ($dirname === '') {

332 public function createDir($dirname, array $config = [])

333 {

334 $dirname = Util::normalizePath($dirname);

335 $config = $this->prepareConfig($config);

336

PlatformJobQueueTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 329 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: PlatformJobQueueTest.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

23 /** Zend_Queue */

24 require_once 'Zend/Queue.php';

25

26 /** Zend_Queue */

31

32 /** Base Adapter test class */

33 require_once dirname(__FILE__) . '/AdapterTest.php';

34

35 /**

RenameTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 473 lines

1 <?php

2 /**

3 * Zend Framework

21 */

22

23 if (!defined("PHPUnit_MAIN_METHOD")) {

24 define("PHPUnit_MAIN_METHOD", "Zend_Filter_File_RenameTest::main");

28 * @see Zend_Filter_File_Rename

29 */

30 require_once 'Zend/Filter/File/Rename.php';

31

32 /**

38 * @group Zend_Filter

39 */

40 class Zend_Filter_File_RenameTest extends PHPUnit_Framework_TestCase

41 {

42 /**

FilesystemTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 240 lines

42 array('/foo/bar', '/foo/baz', true, "dirname(__DIR__).'/baz'"),

43 array('/foo/bin/run', '/foo/vendor/acme/bin/run', true, "dirname(dirname(__DIR__)).'/vendor/acme/bin/run'"),

44 array('/foo/bin/run', '/bar/bin/run', true, "'/bar/bin/run'"),

45 array('/bin/run', '/bin/run', true, "__DIR__"),

47 array('c:/bin/run', 'c:/vendor/acme/bin/run', true, "dirname(dirname(__DIR__)).'/vendor/acme/bin/run'"),

48 array('c:\\bin\\run', 'c:/vendor/acme/bin/run', true, "dirname(dirname(__DIR__)).'/vendor/acme/bin/run'"),

49 array('c:/bin/run', 'd:/vendor/acme/bin/run', true, "'d:/vendor/acme/bin/run'"),

50 array('c:\\bin\\run', 'd:/vendor/acme/bin/run', true, "'d:/vendor/acme/bin/run'"),

51 array('C:/Temp/test', 'C:\Temp', true, "dirname(__DIR__)"),

52 array('C:/Temp', 'C:\Temp\test', true, "__DIR__ . '/test'"),

53 array('/tmp/test', '/tmp', true, "dirname(__DIR__)"),

63 array('/foo/bar_vendor', '/foo/bar/src', true, "dirname(__DIR__).'/bar/src'"),

64 array('/foo/bar_vendor/src2', '/foo/bar/src/lib', true, "dirname(dirname(__DIR__)).'/bar/src/lib'"),

65 );

66 }

YamlFileLoader.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 236 lines

1 <?php

2

3 /*

170 $methods = isset($config['methods']) ? $config['methods'] : null;

171

172 $this->setCurrentDir(dirname($path));

173

174 $subCollection = $this->import($config['resource'], $type, false, $file);

PlatformJobQueueTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 329 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: PlatformJobQueueTest.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

23 /** Zend_Queue */

24 require_once 'Zend/Queue.php';

25

26 /** Zend_Queue */

31

32 /** Base Adapter test class */

33 require_once dirname(__FILE__) . '/AdapterTest.php';

34

35 /**

YamlFileLoader.php (https://bitbucket.org/cryofrost/portal.git) PHP · 339 lines

1 <?php

2

3 /*

94

95 foreach ($content['imports'] as $import) {

96 $this->setCurrentDir(dirname($file));

97 $this->import($import['resource'], null, isset($import['ignore_errors']) ? (Boolean) $import['ignore_errors'] : false, $file);

98 }

Services_BuzzurlTest.php (https://github.com/GunioRobot/php-services_buzzurl.git) PHP · 300 lines

1 <?php

2 /**

3 * unit test for Services_Buzzurl

4 *

5 * @author tell-k <ffk2005@gmail.com>

6 * @since PHP5.2

7 * @version $Id$

8 */

9 require_once dirname(__FILE__) . '/../lib/t.php';

10

11 $id = 'tell-k'; //set your buzzurl_id

14 $t = new lime_test(68, new lime_output_color());

15

16 require_once 'Services/Buzzurl.php';

17

18 $t->diag('getInstance');

XmlImportTemplateParser.php (https://gitlab.com/najomie/fit-hippie) PHP · 444 lines

7 require_once dirname(__FILE__) . '/ast/XmlImportAstSequence.php';

8 require_once dirname(__FILE__) . '/ast/XmlImportAstPrint.php';

9 require_once dirname(__FILE__) . '/ast/XmlImportAstText.php';

10 require_once dirname(__FILE__) . '/ast/XmlImportAstWith.php';

11 require_once dirname(__FILE__) . '/ast/XmlImportAstForeach.php';

12 require_once dirname(__FILE__) . '/ast/XmlImportAstIf.php';

13 require_once dirname(__FILE__) . '/ast/XmlImportAstMath.php';

14 require_once dirname(__FILE__) . '/ast/XmlImportAstSpintax.php';

15

16 require_once dirname(__FILE__) . '/ast/XmlImportAstXPath.php';

18 require_once dirname(__FILE__) . '/ast/XmlImportAstInteger.php';

19 require_once dirname(__FILE__) . '/ast/XmlImportAstFloat.php';

20 require_once dirname(__FILE__) . '/ast/XmlImportAstFunction.php';

Logical.php (https://gitlab.com/adamlwalker/generatedata) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

FaultTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 297 lines

24 if (!defined("PHPUnit_MAIN_METHOD")) {

25 require_once dirname(__FILE__) . '/../../../TestHelper.php';

26 define("PHPUnit_MAIN_METHOD", "Zend_XmlRpc_Server_FaultTest::main");

29 require_once "PHPUnit/Framework/TestCase.php";

30 require_once "PHPUnit/Framework/TestSuite.php";

31

32 require_once 'Zend/XmlRpc/Server.php';

33 require_once 'Zend/XmlRpc/Server/Fault.php';

34

35 /**

53 public static function main()

54 {

55 require_once "PHPUnit/TextUI/TestRunner.php";

56

57 $suite = new PHPUnit_Framework_TestSuite("Zend_XmlRpc_Server_FaultTest");

Clover.php (https://gitlab.com/judielsm/Handora) PHP · 284 lines

1 <?php

2 /*

3 * This file is part of the PHP_CodeCoverage package.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

10

11 /**

12 * Generates a Clover XML logfile from an PHP_CodeCoverage object.

13 *

14 * @since Class available since Release 1.0.0

15 */

16 class PHP_CodeCoverage_Report_Clover

17 {

18 /**

Logical.php (https://gitlab.com/ptisky/API_prestashop) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.9, 2013-06-02

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

TestShellTest.php (https://github.com/kunit/cakephp.git) PHP · 346 lines

5 * PHP 5

6 *

7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

153 $this->assertSame('awesome', $return);

154

155 $return = $this->Shell->mapFileToCategory(dirname(CAKE) . 'plugins/awesome/Controller/ExampleController.php');

156 $this->assertSame('awesome', $return);

157 }

266 $this->assertSame('Controller/ExampleController', $return);

267

268 $return = $this->Shell->mapFileToCase(dirname(CAKE) . 'plugins/awesome/Test/Case/Controller/ExampleControllerTest.php', 'awesome', false);

269 $this->assertSame('Controller/ExampleController', $return);

270 }

vfsStreamWrapperFileTestCase.php (https://github.com/acoulton/vfsStream.git) PHP · 335 lines

1 <?php

2 /**

3 * Test for org::bovigo::vfs::vfsStreamWrapper.

9 require_once 'org/bovigo/vfs/vfsStream.php';

10 require_once 'PHPUnit/Framework/TestCase.php';

11 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';

provider.php (https://github.com/F5/zetacomponents.git) PHP · 243 lines

1 <?php

2 /**

3 *

54 {

55 $ttc = ezcTemplateTranslationConfiguration::getInstance();

56 $ttc->manager = new ezcTranslationManager( new ezcTranslationTsBackend( dirname( __FILE__ ) . '/translations' ) );

57

58 self::assertEquals( 'Test Eén', ezcTemplateTranslationProvider::translate( "Test 1", "test", array() ) );

62 {

63 $ttc = ezcTemplateTranslationConfiguration::getInstance();

64 $ttc->manager = new ezcTranslationManager( new ezcTranslationTsBackend( dirname( __FILE__ ) . '/translations' ) );

65

66 self::assertEquals( 'Test Eén (a, c, b)', ezcTemplateTranslationProvider::translate( "Test 1 %1 %2 %3", "test", array( 1 => 'a', 'b', 'c' ) ) );

70 {

71 $ttc = ezcTemplateTranslationConfiguration::getInstance();

72 $ttc->manager = new ezcTranslationManager( new ezcTranslationTsBackend( dirname( __FILE__ ) . '/translations' ) );

73

74 try

AddSummaryRow.test.php (https://github.com/quarkness/piwik.git) PHP · 150 lines

1 <?php

2 if(!defined('PIWIK_CONFIG_TEST_INCLUDED'))

3 {

4 require_once dirname(__FILE__)."/../../../../tests/config_test.php";

5 }

6 require_once 'DataTable.php';

ImageSizeTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 248 lines

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: ImageSizeTest.php 22668 2010-07-25 14:50:46Z thomas $

21 */

22

23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.

24 if (!defined("PHPUnit_MAIN_METHOD")) {

25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");

29 * Test helper

30 */

31 require_once dirname(__FILE__) . '/../../../TestHelper.php';

32

33 /**

44 * @group Zend_Validate

45 */

46 class Zend_Validate_File_ImageSizeTest extends PHPUnit_Framework_TestCase

47 {

48 /**

TargetTxtClassObject.py (https://gitlab.com/envieidoc/Clover) Python · 190 lines

6 # are licensed and made available under the terms and conditions of the BSD License

7 # which accompanies this distribution. The full text of the license may be found at

8 # http://opensource.org/licenses/bsd-license.php

9 #

10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

81 try:

82 F = open(FileName, 'r')

83 self.ConfDirectoryPath = os.path.dirname(FileName)

84 except:

85 EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=FileName)

CmsCompoundObjectTest.php (https://gitlab.com/fbi/october) PHP · 259 lines

1 <?php

2

3 use Cms\Classes\Theme;

9 protected function parseSettings() {}

10

11 public static function getObjectTypeDirName()

12 {

13 return 'testobjects';

19 protected function parseSettings() {}

20

21 public static function getObjectTypeDirName()

22 {

23 return 'temporary';

249 {

250 $expected = file_get_contents($expected);

251 $expected = preg_replace('~\R~u', PHP_EOL, $expected); // Normalize EOL

252

253 $actual = file_get_contents($actual);

Configuration.php (https://gitlab.com/CORP-RESELLER/shopping-cart-lite) PHP · 346 lines

1 <?php

2 /**

3 *

216

217 $caPath = realpath(

218 dirname(__FILE__) .

219 $sslPath . 'api_braintreegateway_com.ca.crt'

220 );

test.sh (https://bitbucket.org/guilleferrer/angularjsbundle.git) Shell · 8 lines

1 #!/bin/bash

2

3 BASE_DIR=`dirname $0`

4

5 java -jar "$BASE_DIR/../test/lib/jstestdriver/JsTestDriver.jar" \

errors.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 288 lines

8

9 /**

10 * @ignore - PHP5 compatibility fix.

11 */

12 if (! defined('E_STRICT')) {

17 * Includes SimpleTest files.

18 */

19 require_once dirname(__FILE__) . '/invoker.php';

20 require_once dirname(__FILE__) . '/test_case.php';

21 require_once dirname(__FILE__) . '/expectation.php';

22 /**#@-*/

23

119 /**

120 * Adds an error to the front of the queue.

121 * @param integer $severity PHP error code.

122 * @param string $content Text of error.

123 * @param string $filename File error occoured in.

Logical.php (https://gitlab.com/Zinnurain/destination_finder_beta) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

MediaValidationTest.php (https://github.com/bmcclure/CakePHP-Media-Plugin.git) PHP · 305 lines

1 <?php

2 /**

3 * Media Validation Test Case File

8 * Redistributions of files must retain the above copyright notice.

9 *

10 * PHP 5

11 * CakePHP 2

14 * @link http://github.com/davidpersson/media

15 * @package Media.Test.Case.Lib

16 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

17 */

18

21 require_once dirname(dirname(__FILE__)) . DS . 'constants.php';

22 require_once dirname(dirname(dirname(__FILE__))) . DS . 'Fixture' . DS . 'TestData.php';

23

24 /**

Logical.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.8, 2012-10-12

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

TestCommon.php (https://github.com/apinstein/jqjobs.git) PHP · 204 lines

1 <?php

2

3 require_once dirname(__FILE__) . '/../src/JQJobs/JQJobs.php';

4 const JQJOB_ID_DOES_NOT_EXIST = 999999;

5

6 $composerAutoloader = dirname(__FILE__) . '/../vendor/autoload.php';

7 if (file_exists($composerAutoloader))

8 {

13 {

14 ini_set('include_path',

15 dirname(__FILE__) . "/../externals/pear/php"

16 . ":" . dirname(__FILE__) . "/../lib/propel"

42 }

43

44 Propel::init(dirname(__FILE__) . "/../lib/propel/jqjobs-conf.php");

45

46 /************** JQStore_Propel Genterator (TEST DB) ********************/

ExtractTest.php (https://bitbucket.org/rchlmrtn/chiari.git) PHP · 154 lines

1 <?php

2

3 require_once dirname( __FILE__ ) . '/extract.php';

4

5 class ExtractTest extends PHPUnit_Framework_TestCase {

15 $expected = new Translation_Entry( array( 'singular' => 'baba', 'references' => array('baba.php:1') ) );

16 $result = $this->extractor->extract_entries('<?php __("baba"); ?>', 'baba.php' );

17 $this->assertEquals( $expected, $result->entries['baba'] );

18 }

75

76 function test_entry_from_call_zero() {

77 $entry = $this->extractor->entry_from_call( array( 'name' => '__', 'args' => array('0') ), 'baba.php' );

78 $this->assertEquals( $entry, new Translation_Entry( array( 'singular' => '0' ) ) );

79 }

108

109 function test_find_function_calls_shouldnt_be_mistaken_by_a_class() {

110 $this->assertEquals( array(), $this->extractor->find_function_calls( array('__'), '<?php class __ { }; ("dyado");' ) );

111 }

112

PlatformTestProvider.php (https://github.com/crew-cr/Crew.git) PHP · 311 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . '/PlatformTestBase.php';

12

13 /**

Logical.php (https://github.com/ashwanthkumar/webnaplo.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.6, 2011-02-27

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = false;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

CreditCardVerificationAdvancedSearchTest.php (https://gitlab.com/hunt9310/ras) PHP · 259 lines

1 <?php

2 namespace Test\Integration;

3

4 require_once dirname(__DIR__) . '/Setup.php';

5

6 use Test;

ReleaseController.php (https://gitlab.com/brucealdridge/yii2) PHP · 211 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

168 protected function getExtensionChangelogs()

169 {

170 return glob(dirname(YII2_PATH) . '/extensions/*/CHANGELOG.md');

171 }

172

188 '"minimum-stability": "' . $stability . '",',

189 [

190 dirname(YII2_PATH) . '/apps/advanced/composer.json',

191 dirname(YII2_PATH) . '/apps/basic/composer.json',

192 dirname(YII2_PATH) . '/apps/benchmark/composer.json',

193 ]

194 );

KalturaAuditClientPlugin.php (https://github.com/richhl/kalturaCE.git) PHP · 705 lines

1 <?php

2 /**

3 * @package External

4 * @subpackage Kaltura

5 */

6 require_once(dirname(__FILE__) . "/../KalturaClientBase.php");

7 require_once(dirname(__FILE__) . "/../KalturaEnums.php");

8 require_once(dirname(__FILE__) . "/../KalturaTypes.php");

9

10 /**

Debug.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 204 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Varien_Debug

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

53 self::$_filePath = BP;

54 } else {

55 self::$_filePath = dirname(dirname(__FILE__));

56 }

57 }

unit_tester.php (https://github.com/nigeldaley/moodle.git) PHP · 420 lines

1 <?php

2 /**

3 * base include file for SimpleTest

10 * include other SimpleTest class files

11 */

12 require_once(dirname(__FILE__) . '/test_case.php');

13 require_once(dirname(__FILE__) . '/dumper.php');

16 /**

17 * Standard unit test class for day to day testing

18 * of PHP code XP style. Adds some useful standard

19 * assertions.

20 * @package SimpleTest

52 /**

53 * Will be true on false and vice versa. False

54 * is the PHP definition of false, so that null,

55 * empty strings, zero and an empty array all count

56 * as false.

BrokerTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 299 lines

13 }

14

15 require_once "PHPUnit/Framework/TestCase.php";

16 require_once "PHPUnit/Framework/TestSuite.php";

19 require_once 'Zend/Controller/Action/HelperBroker.php';

20 require_once 'Zend/Controller/Request/Http.php';

21 require_once 'Zend/Controller/Response/Cli.php';

33 public static function main()

34 {

35 require_once "PHPUnit/TextUI/TestRunner.php";

36

37 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Plugin_BrokerTest");

63 public function testUsingFrontController()

64 {

65 $this->controller->setControllerDirectory(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . '_files');

66 $request = new Zend_Controller_Request_Http('http://framework.zend.com/empty');

67 $this->controller->setResponse(new Zend_Controller_Response_Cli());

source_code.php (https://github.com/F5/zetacomponents.git) PHP · 317 lines

1 <?php

2 /**

3 * File containing the ezcTemplateSourceCode class

72 *

73 * @property string $stream

74 * The PHP stream path for the template source file.

75 * @property string $resource

76 * The resource string which requested this template.

161 * Initialises the source object with the code and output context.

162 *

163 * @param string $stream The actual PHP stream path for the template source

164 * file.

165 * @param string $resource The requested resource string, if false $stream

180

181 /**

182 * Loads the data from the PHP stream into the $code member variable.

183 *

184 * @throws ezcTemplateFileNotFoundException if the file does not exist on disk.

axis_rotated_boxed_renderer_test.php (https://github.com/F5/zetacomponents.git) PHP · 304 lines

1 <?php

2 /**

3 * ezcGraphAxisRotatedRendererTest

26 */

27

28 require_once dirname( __FILE__ ) . '/test_case.php';

29

30 /**

46 public static function suite()

47 {

48 return new PHPUnit_Framework_TestSuite( __CLASS__ );

49 }

50

53 static $i = 0;

54

55 if ( version_compare( phpversion(), '5.1.3', '<' ) )

56 {

57 $this->markTestSkipped( "This test requires PHP 5.1.3 or later." );

Profile.php (https://github.com/frhumanes/PLM.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Profile.php 20967 2010-02-07 18:17:49Z ralph $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

Logical.php (https://github.com/Tassader/Spedicka.git) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.8.0, 2014-03-02

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

CliTester.php (https://gitlab.com/febfeb/pelatihan-git) PHP · 468 lines

1 <?php //[STAMP] f365b25a1eb5c1f6a19f65f9f04a6f84

2

3 // This class was automatically generated by build task

23 * @method void haveFriend($name, $actorClass = null)

24 *

25 * @SuppressWarnings(PHPMD)

26 */

27 class CliTester extends \Codeception\Actor

49 * Usage:

50 *

51 * ``` php

52 * <?php

69 * Deletes a file

70 *

71 * ``` php

72 * <?php

File.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 274 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Archive

23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

79

80 $this->_filePath = $filePath;

81 $this->_fileLocation = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : '';

82 $this->_fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : '';

83 }

Logical.php (https://gitlab.com/alexandresgv/siteentec) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

LinePlot.class.php (https://github.com/goldoraf/OBM.git) PHP · 591 lines

1 <?php

2 /*

3 * This work is hereby released into the Public Domain.

8 */

9

10 require_once dirname(__FILE__)."/Plot.class.php";

11

12 /* <php4> */

15 define("LINEPLOT_MIDDLE", 1);

16

17 /* </php4> */

18

19 /**

Logical.php (https://github.com/andrerezende/SIE.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.5, 2010-12-10

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = false;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

FilesSizeTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 235 lines

29 * Test helper

30 */

31 require_once dirname(__FILE__) . '/../../../TestHelper.php';

32

33 /**

83 $this->assertEquals(

84 $element[1],

85 $validator->isValid(dirname(__FILE__) . '/_files/testsize.mo'),

86 "Tested with " . var_export($element, 1)

87 );

99

100 $validator = new Zend_Validate_File_FilesSize(array('min' => 0, 'max' => 200));

101 $this->assertEquals(false, $validator->isValid(dirname(__FILE__) . '/_files/nofile.mo'));

102 $this->assertTrue(array_key_exists('fileFilesSizeNotReadable', $validator->getMessages()));

103

BlobStorageSharedAccessTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 208 lines

1 <?php

2 /**

3 * Zend Framework

24 * Test helpers

25 */

26 require_once dirname(__FILE__) . '/../../../TestHelper.php';

27

28 /** Zend_Service_WindowsAzure_Storage_Blob */

29 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';

30

31 /** Zend_Service_WindowsAzure_Credentials_SharedAccessSignature */

32 require_once 'Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php';

33

34 /**

FileSystem_LocalTest.php (https://github.com/ThiloWitt/core.git) PHP · 311 lines

1 <?php

2 require_once dirname(__FILE__) . '/../../../../bootstrap.php';

3

4 // exclude the following file from code coverage reports.

5 PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(dirname(__FILE__). '/../../../../../src/lib/Zikula/FileSystem/Facade/Local.php');

6

7 /**

8 * Zikula_FileSystem_Local test case.

9 */

10 class Zikula_FileSystem_LocalTest extends PHPUnit_Framework_TestCase

11 {

12

141 {

142 // Configure the stub.

143 $handle = fopen('php://temp', 'r+');

144 $stub = $this->getMock('Zikula_FileSystem_Facade_Local');

145 $stub->expects($this->any())

MaildirMessageOldTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 192 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: MaildirMessageOldTest.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

24 * Zend_Mail_Storage_Maildir

25 */

26 require_once 'Zend/Mail/Storage/Maildir.php';

27

28 /**

29 * Zend_Config

30 */

31 require_once 'Zend/Config.php';

32

33 /**

ClientTest.php (https://github.com/jonathanbecker/Elastica.git) PHP · 340 lines

1 <?php

2 require_once dirname(__FILE__) . '/../../bootstrap.php';

3

4

5 class Elastica_ClientTest extends PHPUnit_Framework_TestCase

6 {

7 public function setUp() {

dmMarkdownLinkTest.php (https://github.com/xdade/diem.git) PHP · 145 lines

1 <?php

2

3 require_once(dirname(__FILE__).'/helper/dmUnitTestHelper.php');

4 $helper = new dmUnitTestHelper();

5 $helper->boot('front');

KalturaDocumentClientPlugin.php (https://bitbucket.org/pixelant/kaltura.git) PHP · 467 lines

1 <?php

2 require_once(dirname(__FILE__) . "/../KalturaClientBase.php");

3 require_once(dirname(__FILE__) . "/../KalturaEnums.php");

4 require_once(dirname(__FILE__) . "/../KalturaTypes.php");

5

6 class KalturaDocumentEntryOrderBy

SluggableBehaviorTest.php (https://github.com/1989gaurav/Propel.git) PHP · 299 lines

1 <?php

2

3 /*

4 * $Id: TimestampableBehaviorTest.php 1460 2010-01-17 22:36:48Z francois $

5 * This file is part of the Propel package.

6 * For the full copyright and license information, please view the LICENSE

10 */

11

12 require_once dirname(__FILE__) . '/../../../../tools/helpers/bookstore/BookstoreTestBase.php';

13

14 /**

Range.test.php (https://github.com/quarkness/piwik.git) PHP · 504 lines

1 <?php

2 if(!defined('PIWIK_CONFIG_TEST_INCLUDED'))

3 {

4 require_once dirname(__FILE__)."/../../../tests/config_test.php";

5 }

6

Logical.php (https://github.com/real-chocopanda/PHPExcel.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = false;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

index.php (https://github.com/postme/PHP-NIST-RBAC-library.git) PHP · 338 lines

16 * Include configuration file

17 */

18 include dirname(__FILE__) . '/configuration.php';

19

20 /**

21 * Include the helper functions

22 */

23 include dirname(__FILE__) . '/../../include/php/include.php';

24

25 /**

26 * Include the NIST Core RBAC API library

27 */

28 include dirname(__FILE__) . '/../../lib/rbac_api.php';

29

30

Logical.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.7, 2012-05-19

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

121 $arg = FALSE;

122 } else {

123 return PHPExcel_Calculation_Functions::VALUE();

124 }

125 $returnValue = $returnValue && ($arg != 0);

Debug.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 204 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Varien_Debug

23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

53 self::$_filePath = BP;

54 } else {

55 self::$_filePath = dirname(dirname(__FILE__));

56 }

57 }

SerializerTest.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 229 lines

1 <?php

2

3 class HTMLPurifier_DefinitionCache_SerializerTest extends HTMLPurifier_DefinitionCacheHarness

8 // XXX SimpleTest does some really crazy stuff in the background

9 // to do equality checks. Unfortunately, this makes some

10 // versions of PHP segfault. So we need to define a better,

11 // homebrew notion of equality and use that instead. For now,

12 // the identical asserts are commented out.

192 $config->version = '1.0.0';

193 $config->setReturnValue('get', 1, array('Test.DefinitionRev'));

194 $dir = dirname(__FILE__) . '/SerializerTest';

195 $config->setReturnValue('get', $dir, array('Cache.SerializerPath'));

196

210 $config->version = '1.0.0';

211 $config->setReturnValue('get', 1, array('Test.DefinitionRev'));

212 $dir = dirname(__FILE__) . '/SerializerTest';

213 $config->setReturnValue('get', $dir, array('Cache.SerializerPath'));

214 $config->setReturnValue('get', 0777, array('Cache.SerializerPermissions'));

xpdoquery.class.php (https://github.com/enigmatic-user/revolution.git) PHP · 157 lines

1 <?php

2 /*

3 * Copyright 2010-2015 by MODX, LLC.

27

28 /** Include the base {@see xPDOQuery} class */

29 include_once (dirname(__DIR__) . '/xpdoquery.class.php');

30

31 /**

SplFileInfo.php (https://github.com/tstarling/hiphop-php.git) PHP · 432 lines

3 // This doc comment block generated by idl/sysdoc.php

4 /**

5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )

6 *

7 * The SplFileInfo class offers a high-level object oriented interface to

189 // This doc comment block generated by idl/sysdoc.php

190 /**

191 * ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )

192 *

193 * Returns the time when the contents of the file were changed. The time

410 // This doc comment block generated by idl/sysdoc.php

411 /**

412 * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )

413 *

414 * Use this method to set a custom class which will be used when

Database.php (https://github.com/allinside/Yii-CMS.git) PHP · 384 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.6, 2011-02-27

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Database {

71 foreach($criteria as $row => $criterion) {

72 if ($criterion[$key] > '') {

73 $testCondition[] = '[:'.$criteriaName.']'.PHPExcel_Calculation_Functions::_ifCondition($criterion[$key]);

74 $testConditionCount++;

75 }

Router.php (https://github.com/klj613/klj613micromvc.git) PHP · 207 lines

1 <?php

2 /**

3 * This file is part of klj613's micro MVC framework made out of boredom.

188 }

189

190 $baseUri = dirname($_SERVER['SCRIPT_NAME']) . '/';

191

192 return $baseUri . $uri;

202 public static function getUriFromGlobals()

203 {

204 return substr($_SERVER['REQUEST_URI'], strlen(dirname($_SERVER['SCRIPT_NAME'])) + 1);

205 }

206 }

Settings.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 332 lines

22 * @package PHPExcel_Settings

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');

34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

35 }

36

112 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management

113 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

114 * @return boolean Success or failure

115 */

130 * @return string Name of the Zip handler Class that PHPExcel is configured to use

131 * for Zip file management

132 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

133 */

134 public static function getZipClass() {

ImageSizeTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 243 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: ImageSizeTest.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.

24 if (!defined("PHPUnit_MAIN_METHOD")) {

25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");

29 * @see Zend_Validate_File_ImageSize

30 */

31 require_once 'Zend/Validate/File/ImageSize.php';

32

33 /**

FrontTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 354 lines

2 require_once 'Zend/Controller/Front.php';

3 require_once 'PHPUnit/Framework/TestCase.php';

4

5 require_once 'Zend/Controller/Request/Http.php';

6 require_once 'Zend/Controller/Response/Cli.php';

7 require_once 'Zend/Controller/Dispatcher.php';

16 $this->_controller = Zend_Controller_Front::getInstance();

17 $this->_controller->resetInstance();

18 $this->_controller->setControllerDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files');

19 $this->_controller->returnResponse(true);

20 $this->_controller->throwExceptions(false);

245 public function testDispatch7()

246 {

247 if ('cli' == strtolower(php_sapi_name())) {

248 $this->markTestSkipped('Issues with $_GET in CLI interface prevents test from passing');

249 }

models_spec.rb (https://github.com/maning/mapwarper.git) Ruby · 257 lines

1 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

2 require 'db/postgis_raw'

3 require 'models/common'

Profile.php (https://github.com/Doap/iCms---intelligent-Content-management-system.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Profile.php 20851 2010-02-02 21:45:51Z ralph $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

setting_dashboard.php (https://bitbucket.org/gfelizola/pacaembu-institucional.git) PHP · 175 lines

54 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>

55 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>

56 </td>

57 </tr>

65 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>

66 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>

67 </td>

68 </tr>

109 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>

110 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>

111 </td>

112 </tr>

153 <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>

154 <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e( "Lock meta box positions" , $this->ltd ); ?></label>

155 </td>

156 </tr>

ImageSizeTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 243 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: ImageSizeTest.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.

24 if (!defined("PHPUnit_MAIN_METHOD")) {

25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");

29 * @see Zend_Validate_File_ImageSize

30 */

31 require_once 'Zend/Validate/File/ImageSize.php';

32

33 /**

Profile.php (https://github.com/oveach/tuto-zf-doctrine2.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Profile.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

Profile.php (https://gitlab.com/fabiorf/curso-zend1-aula1) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Profile.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

MaildirMessageOldTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 192 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: MaildirMessageOldTest.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

24 * Zend_Mail_Storage_Maildir

25 */

26 require_once 'Zend/Mail/Storage/Maildir.php';

27

28 /**

29 * Zend_Config

30 */

31 require_once 'Zend/Config.php';

32

33 /**

plugins.php (https://github.com/sarriaroman/Cronos-Aion.git) PHP · 389 lines

1 <?php

2

3 /**

50 * Create a database schema for plugin from file

51 *

52 * @param <String> $file You must provide the absolute path. Ex: dirname(__FILE__) . '/schema.sql'

53 * @return boolean

54 */

178 $plg = Plugin::getByPath($plugin);

179

180 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '&section=' . $section );

181 } else {

182 $permalink = getPermalink(0);

204 $plg = Plugin::getByPath($plugin);

205

206 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '&section=' . $section . "&module=" . $module );

207 } else {

208 $permalink = getPermalink(0);

authentication.php (https://github.com/h-kanjisan/swiftmailer.git) PHP · 237 lines

1 <?php

2 /**

3 * Base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage WebTester

6 * @version $Id: authentication.php 1784 2008-04-26 13:07:14Z pp11 $

7 */

8 /**

9 * include http class

10 */

11 require_once(dirname(__FILE__) . '/http.php');

12

13 /**

RarTest.php (https://github.com/zucchi/zf2.git) PHP · 304 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

19 * @group Zend_Filter

20 */

21 class RarTest extends \PHPUnit_Framework_TestCase

22 {

23 public function setUp()

28

29 $files = array(

30 dirname(__DIR__) . '/_files/zipextracted.txt',

31 dirname(__DIR__) . '/_files/_compress/Compress/First/Second/zipextracted.txt',

32 dirname(__DIR__) . '/_files/_compress/Compress/First/Second',

33 dirname(__DIR__) . '/_files/_compress/Compress/First/zipextracted.txt',

Behavior.php (https://github.com/hhamon/Propel2.git) PHP · 457 lines

1 <?php

2

3 /**

18 *

19 * @author François Zaninotto

20 * @author Hugo Hamon <webmaster@apprendre-php.com> (Propel)

21 */

22 class Behavior extends MappingModel

72 * @var string

73 */

74 protected $dirname;

75

76 /**

359 if (null === $this->dirname) {

360 $r = new \ReflectionObject($this);

361 $this->dirname = dirname($r->getFileName());

362 }

363

SuiteTest.php (https://gitlab.com/madebycloud/derekman) PHP · 235 lines

9 */

10

11 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'BeforeAndAfterTest.php';

12 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'BeforeClassAndAfterClassTest.php';

13 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'DataProviderSkippedTest.php';

14 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'DataProviderIncompleteTest.php';

15 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'InheritedTestCase.php';

16 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NoTestCaseClass.php';

18 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NotPublicTestCase.php';

19 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'NotVoidTestCase.php';

20 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'OverrideTestCase.php';

21 require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'RequirementsClassBeforeClassHookTest.php';

22

23 /**

StringUtil.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 121 lines ✨ Summary

This Java code provides utility methods for string manipulation, including splitting a string into an array of substrings based on a delimiter, sorting an array of strings using bubble sort, finding the maximum common prefix between two strings, and parsing method signatures from their names and parameter types. It also includes a filename splitter that separates directory and base name components.

102

103 /**

104 Split a filename into dirName, baseName

105 @return String [] { dirName, baseName }

106 public String [] splitFileName( String fileName )

107 {

108 String dirName, baseName;

109 int i = fileName.lastIndexOf( File.separator );

110 if ( i != -1 ) {

111 dirName = fileName.substring(0, i);

112 baseName = fileName.substring(i+1);

113 } else

114 baseName = fileName;

115

116 return new String[] { dirName, baseName };

117 }

118

test_version.py (https://bitbucket.org/tarek/distutils2/) Python · 254 lines ✨ Summary

This Python code defines a versioning system, including classes for parsing and comparing versions. It includes unit tests to ensure the functionality is correct, with two test cases: VersionTestCase and VersionWhiteBoxTestCase. The tests cover various aspects of the versioning system, such as parsing, comparison, and predicate matching.

244

245 def test_suite():

246 #README = os.path.join(os.path.dirname(__file__), 'README.txt')

247 #suite = [doctest.DocFileSuite(README), unittest.makeSuite(VersionTestCase)]

248 suite = [unittest.makeSuite(VersionTestCase),

Rakefile (git://github.com/opscode/chef.git) Rakefile · 66 lines ✨ Summary

This Rakefile generates a Ruby gem for Chef Solr, a search engine plugin for Chef. It creates archives of the Solr home and Jetty directories, installs the gem, and generates documentation using RDoc. The gem can be installed and uninstalled, and it includes version information in its documentation.

17 # limitations under the License.

18 #

19 require File.dirname(__FILE__) + '/lib/chef/solr/version'

20

21 require 'rubygems'

23 require 'rubygems/package_task'

24

25 spec = eval(File.read(File.dirname(__FILE__) + "/chef-solr.gemspec"))

26

27 desc "Create solr archives"

28 task :tar_solr do

29 %w{solr-home solr-jetty}.each do |tar|

30 Dir.chdir(File.dirname(__FILE__) + "/solr/#{tar}") { sh "tar cvzf ../#{tar}.tar.gz *" }

31 end

32 end

configure.in (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Unknown · 79 lines

59

60 #if test "x${prefix}" = "xNONE"; then

61 # AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")

62 #else

63 # AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")

Makefile.in.in (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Unknown · 250 lines

19 prefix = @prefix@

20 exec_prefix = @exec_prefix@

21 datadir = $(prefix)/@DATADIRNAME@

22 localedir = $(datadir)/locale

23 gnulocaledir = $(prefix)/share/locale

pretty_vcproj.py (https://bitbucket.org/ultra_iter/qt-vtl.git) Python · 316 lines

132 # We want to fix up these paths

133 path_list = value.split(';')

134 new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1]))

135 node.setAttribute(name, ';'.join(new_list))

136 if not value:

208 if dom.documentElement.attributes:

209 vsprops = dom.documentElement.getAttribute('InheritedPropertySheets')

210 return FixFilenames(vsprops.split(';'), os.path.dirname(filename))

211 return []

212

293 # Fix the filenames to be absolute.

294 vsprops_list = FixFilenames(vsprops.strip().split(';'),

295 os.path.dirname(argv[1]))

296

297 # Extend the list of vsprops with all vsprops contained in the current

install-sh (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Shell · 252 lines ✨ Summary

This shell script, install, is a utility for installing files and directories on a system. It takes input from the user, including source file/directory, destination directory, and options (e.g., ownership, permissions). The script creates the destination directory if necessary, moves or copies the file to it, and applies any specified transformations or modifications before renaming the final executable.

156 fi

157

158 ## this sed command emulates the dirname command

159 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

160

portingrules.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 296 lines

243 if(QFileInfo(includeFilePath).isAbsolute())

244 return includeFilePath;

245 QString relativeDirectory = QFileInfo(currentFilePath).dir().dirName();

246 QString testFileName = relativeDirectory + QLatin1String("/") + includeFilePath;

247 if (QFile::exists(testFileName))

JCompilerPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 294 lines ✨ Summary

This Java code is part of a text editor’s configuration settings for Java compilation and packaging options. It allows users to customize various settings, such as autosave, output directory, classpath, and deprecated warnings. The code updates these settings when the user makes changes and saves them to the text editor’s configuration.

190 if (file != null) {

191 try {

192 String dirName = file.getCanonicalPath();

193 outputDirectory.setText(dirName);

aclocal.m4 (https://bitbucket.org/freebsd/freebsd-head/) m4 · 905 lines ✨ Summary

This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.

297 # So let's grep whole file.

298 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then

299 dirpart=`AS_DIRNAME("$mf")`

300 else

301 continue

319 # Make sure the directory exists.

320 test -f "$dirpart/$file" && continue

321 fdir=`AS_DIRNAME(["$file"])`

322 AS_MKDIR_P([$dirpart/$fdir])

323 # echo "creating $dirpart/$file"

465 esac

466 done

467 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])

468

469 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.

fetch.js (git://github.com/isaacs/npm.git) JavaScript · 68 lines ✨ Summary

This JavaScript code fetches an HTTP URL to a local file, handling authentication and proxy settings based on npm configuration. It uses the request library to make the GET request and writes the response to a local file using fs. The code also logs verbose messages for debugging purposes.

18 if (typeof cb !== "function") cb = headers, headers = {}

19 log.verbose(local, "fetch to")

20 mkdir(path.dirname(local), function (er) {

21 if (er) return cb(er)

22 fetch_(remote, local, headers, cb)

bulkstamp.py (git://github.com/IronLanguages/main.git) Python · 136 lines ✨ Summary

This is a Python script that stamps version information on files in a given directory tree. It takes three arguments: the version number, the root directory to search, and a description file containing product name, major, minor, and other version information. The script uses the verstamp module to stamp the version information on files with extensions .dll, .pyd, .exe, and .ocx.

47

48

49 def walk(arg, dirname, names):

50 global numStamped

51 vars, debug, descriptions = arg

54 if fnmatch.fnmatch(name, pat):

55 # Handle the "_d" thing.

56 pathname = os.path.join(dirname, name)

57 base, ext = os.path.splitext(name)

58 if base[-2:]=='_d':

test_oinspect.py (git://github.com/ipython/ipython.git) Python · 439 lines ✨ Summary

This Python code is a test suite for an interactive shell, likely IPython, that provides functionality to inspect and display information about objects, functions, and modules in a user-friendly way. It tests various features such as displaying docstrings, source code, type hints, and signature rendering with different levels of detail.

279 foo = foo.setter(lambda self, v: setattr(self, 'bar', v))

280

281 dname = property(posixpath.dirname)

282 adder = property(simple_add)

283

287

288 i = inspector.info(A.dname, detail_level=1)

289 nt.assert_in('def dirname(p)', i['source'])

290

291 i = inspector.info(A.adder, detail_level=1)

contentlanguages.php (https://bitbucket.org/kraymitchell/fcd.git) PHP · 72 lines

1 <?php

2 /**

3 * @package Joomla.Platform

10 defined('JPATH_PLATFORM') or die;

11

12 require_once dirname(__FILE__) . '/list.php';

13

14 /**