Skip to content

Commit

Permalink
Misc test housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
epdenouden authored and sebastianbergmann committed Dec 24, 2018
1 parent ca8441f commit df0e66c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 20 deletions.
Expand Up @@ -2,13 +2,16 @@
phpunit -c ../../_files/configuration.custom-printer.xml --debug BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '-c';
$_SERVER['argv'][2] = __DIR__ . '/../_files/configuration.custom-printer.xml';
$_SERVER['argv'][3] = '--debug';
$_SERVER['argv'][4] = 'BankAccountTest';
$_SERVER['argv'][5] = __DIR__ . '/../_files/BankAccountTest.php';
$arguments = [
'-c',
\realpath(__DIR__ . '/_files/configuration.custom-printer.xml'),
'--debug',
'BankAccountTest',
\realpath(__DIR__ . '/../../_files/BankAccountTest.php'),
];
\array_splice($_SERVER['argv'], 1, count($arguments), $arguments);

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
Expand Down
@@ -1,14 +1,17 @@
--TEST--
phpunit -c ../../_files/configuration.custom-printer.xml --verbose IncompleteTest ../../_files/IncompleteTest.php
phpunit -c _files/configuration.custom-printer.xml --verbose IncompleteTest ../../_files/IncompleteTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '-c';
$_SERVER['argv'][2] = __DIR__ . '/../_files/configuration.custom-printer.xml';
$_SERVER['argv'][3] = '--verbose';
$_SERVER['argv'][4] = 'IncompleteTest';
$_SERVER['argv'][5] = __DIR__ . '/../_files/IncompleteTest.php';

require __DIR__ . '/../bootstrap.php';
$arguments = [
'-c',
\realpath(__DIR__ . '/_files/configuration.custom-printer.xml'),
'--verbose',
'IncompleteTest',
\realpath(__DIR__ . '/../../_files/IncompleteTest.php'),
];
\array_splice($_SERVER['argv'], 1, count($arguments), $arguments);

require __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
Expand Down
Expand Up @@ -2,12 +2,15 @@
phpunit --reverse-list FailureTest ../../_files/FailureTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = '--reverse-list';
$_SERVER['argv'][3] = 'FailureTest';
$_SERVER['argv'][4] = __DIR__ . '/../_files/FailureTest.php';

require __DIR__ . '/../bootstrap.php';
$arguments = [
'--no-configuration',
'--reverse-list',
'FailureTest',
\realpath(__DIR__ . '/../../_files/FailureTest.php'),
];
\array_splice($_SERVER['argv'], 1, count($arguments), $arguments);

require __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/Framework/ConstraintTest.php
Expand Up @@ -995,6 +995,9 @@ public function testConstraintObjectNotHasAttribute2(): void
$this->fail();
}

/**
* @testdox Constraint PCRE not match
*/
public function testConstraintPCRENotMatch(): void
{
$constraint = Assert::logicalNot(
Expand Down Expand Up @@ -1024,6 +1027,9 @@ public function testConstraintPCRENotMatch(): void
$this->fail();
}

/**
* @testdox Constraint PCRE not match with custom message
*/
public function testConstraintPCRENotMatch2(): void
{
$constraint = Assert::logicalNot(
Expand Down

0 comments on commit df0e66c

Please sign in to comment.