Skip to content

Commit

Permalink
Upgrade PHPUnit require statements (for PEAR QA Team).
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Convissor committed Dec 31, 2011
1 parent a73d5a1 commit 6b68424
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions tests/AllTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
define('PHPUnit_MAIN_METHOD', 'Crypt_DiffieHellman_AllTests::main');
}

require_once 'PHPUnit/TextUI/TestRunner.php';
if ($fp = @fopen('PHPUnit/Autoload.php', 'r', true)) {
require_once 'PHPUnit/Autoload.php';
} elseif ($fp = @fopen('PHPUnit/Framework.php', 'r', true)) {
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
} else {
die('skip could not find PHPUnit');
}
fclose($fp);

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

class Crypt_DiffieHellman_AllTests
{
Expand Down
3 changes: 2 additions & 1 deletion tests/DiffieHellmanTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

require_once dirname(__FILE__) . '/TestHelper.php';
require_once 'Crypt/DiffieHellman.php';
require_once 'PHPUnit/Framework/TestCase.php';

Expand Down Expand Up @@ -69,4 +70,4 @@ public function testDiffieWithBinaryFormsAndLargeIntegers()
$this->assertEquals($expectedSharedSecret, $bobSecretKey);
}

}
}

0 comments on commit 6b68424

Please sign in to comment.