-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64efc1d
commit c85fcdc
Showing
5 changed files
with
55 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
* @copyright 2001-2014 Sebastian Bergmann <[email protected]> | ||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License | ||
* @link http://www.phpunit.de/ | ||
* @since File available since Release 3.6.6 | ||
* @since File available since Release 4.3 | ||
*/ | ||
|
||
/** | ||
|
@@ -52,7 +52,7 @@ | |
* @copyright 2001-2014 Sebastian Bergmann <[email protected]> | ||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License | ||
* @link http://www.phpunit.de/ | ||
* @since Class available since Release 4.0.20 | ||
* @since Class available since Release 4.3 | ||
*/ | ||
class PHPUnit_Framework_Constraint_ExceptionMessageRegExp extends PHPUnit_Framework_Constraint | ||
{ | ||
|
@@ -80,10 +80,10 @@ public function __construct($expected) | |
protected function matches($other) | ||
{ | ||
$match = PHPUnit_Util_Regex::pregMatchSafe($this->expectedMessageRegExp, $other->getMessage()); | ||
|
||
if(false === $match) { | ||
throw new PHPUnit_Framework_Exception ( | ||
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" | ||
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" | ||
); | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
* @copyright 2001-2014 Sebastian Bergmann <[email protected]> | ||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License | ||
* @link http://www.phpunit.de/ | ||
* @since File available since Release 3.7.30 | ||
* @since File available since Release 4.3 | ||
*/ | ||
|
||
/** | ||
|
@@ -51,7 +51,7 @@ | |
* @copyright 2001-2014 Sebastian Bergmann <[email protected]> | ||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License | ||
* @link http://www.phpunit.de/ | ||
* @since Class available since Release 4.0.20 | ||
* @since Class available since Release 4.3 | ||
* @covers PHPUnit_Framework_Constraint_ExceptionMessageRegExp | ||
*/ | ||
class ExceptionMessageRegExpTest extends PHPUnit_Framework_TestCase | ||
|
@@ -88,7 +88,7 @@ public function testMessageXdebugScreamCompatibility() | |
} | ||
|
||
/** | ||
* @coversNothing | ||
* @coversNothing | ||
* @expectedException \Exception variadic | ||
* @expectedExceptionMessageRegExp /^A variadic \w+ message/ | ||
*/ | ||
|
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
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the indentation fixed automatically? If yes, what tool are you using? So I can apply it for the next PR :D
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcioAlmada I did it manually. Maybe @sebastianbergmann has a tool to automate it. We just use two spaces to indent inside a single statement. Took me a while to get used to it, but now it's pretty easy to spot. Not quite sure about the origins of this style, though. Maybe we should consider changing it since it's a little non-standard these days.
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Components that are factored out of PHPUnit (Diff, Exporter, ...) (should) already use PSR-2. At some point PHPUnit itself should be migrated to PSR-2, too.
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastianbergmann Sounds good. Maybe once we factor out the remaining components :)
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait for
phpunit/phpunit
to be just a meta package that pulls in the framework, its dependencies, and a test runner ;-)c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastianbergmann I'm hoping to find the time to work on the assertions / constraints components next weekend.
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome; would be great to get it into 4.3.
c85fcdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, noted. I've been using php-cs-fixer to automate this kind of task for months, almost without problems.