Last active
February 18, 2017 12:10
-
-
Save jeroenvdgulik/c693d3f37b76efb66a55a2b50944c499 to your computer and use it in GitHub Desktop.
Revisions
-
jeroenvdgulik revised this gist
Feb 6, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,9 @@ class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } // In your composer.json We can misuse composer autoloading. // much thanks to @WyriHaximus who pointed it out. // Add the following: "autoload-dev": { "files": [ -
jeroenvdgulik renamed this gist
Feb 6, 2017 . 1 changed file with 9 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,18 @@ <?php // Create a file in /tests/alias.php at the root of your symfony project containing: if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } // In your composer.json We can misuse composer autoloading. Add the following: "autoload-dev": { "files": [ "tests/alias.php" ] }, -
jeroenvdgulik revised this gist
Feb 6, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,8 @@ // Create a file in /tests/alias.php at the root of your symfony project containing: <?php if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } -
jeroenvdgulik revised this gist
Feb 6, 2017 . 3 changed files with 16 additions and 1 deletion.There are no files selected for viewing
File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ <?php // Alternatively if you use your own bootstrap file, just add this line: if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // We can also misuse composer autoloading "autoload-dev": { "files": [ "tests/alias.php" ] }, // Create a file in /tests/alias.php at the root of your symfony project containing: if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } -
jeroenvdgulik revised this gist
Feb 6, 2017 . No changes.There are no files selected for viewing
-
jeroenvdgulik renamed this gist
Feb 6, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jeroenvdgulik created this gist
Feb 6, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <?php // Or alternatively if you use your own bootstrap file, just add this line if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ <?php // create a file in /tests/bootstrap.php at the root of your symfony project $loader = require(__DIR__ . '/../app/autoload.php'); // or whatever path your autoload.php is in if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); } return $loader; // In your phpunit.xml or phpunit.xml.dist change: bootstrap="app/autoload.php" // to bootstrap="tests/bootstrap.php"