-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPUnit as dev dependency
- Loading branch information
Showing
7 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [3.0.0] - 2017-07-XX | ||
### Changed | ||
- made `phpunit/phpunit` a `dev` dependency only | ||
- removed separation of two different branches/releases for PHPUnit < 6 (`1.x`) and >= 6 (`master`/`2.x`) | ||
- renamed phpunit listener class | ||
|
||
### Fixed | ||
- compatibility with `symfony/phpunit-bridge` |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
33 changes: 33 additions & 0 deletions
33
src/DAMA/DoctrineTestBundle/PHPUnit/LegacyPHPUnitListener.php
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace DAMA\DoctrineTestBundle\PHPUnit; | ||
|
||
use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver; | ||
|
||
class LegacyPHPUnitListener extends \PHPUnit_Framework_BaseTestListener | ||
{ | ||
/** | ||
* @param \PHPUnit_Framework_Test $test | ||
*/ | ||
public function startTest(\PHPUnit_Framework_Test $test) | ||
{ | ||
StaticDriver::beginTransaction(); | ||
} | ||
|
||
/** | ||
* @param \PHPUnit_Framework_Test $test | ||
* @param $time | ||
*/ | ||
public function endTest(\PHPUnit_Framework_Test $test, $time) | ||
{ | ||
StaticDriver::rollBack(); | ||
} | ||
|
||
/** | ||
* @param \PHPUnit_Framework_TestSuite $suite | ||
*/ | ||
public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) | ||
{ | ||
StaticDriver::setKeepStaticConnections(true); | ||
} | ||
} |
This file contains 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 characters