Skip to content

Fix occurences of PHPUnit_* namespaces #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions src/assertions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2452,14 +2452,14 @@ assertThat()
############

More complex assertions can be formulated using the
``PHPUnit_Framework_Constraint`` classes. They can be
``PHPUnit\Framework\Constraint`` classes. They can be
evaluated using the ``assertThat()`` method.
:numref:`appendixes.assertions.assertThat.example` shows how the
``logicalNot()`` and ``equalTo()``
constraints can be used to express the same assertion as
``assertNotEquals()``.

``assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint[, $message = ''])``
``assertThat(mixed $value, PHPUnit\Framework\Constraint $constraint[, $message = ''])``

Reports an error identified by ``$message`` if the ``$value`` does not match the ``$constraint``.

Expand Down Expand Up @@ -2488,7 +2488,7 @@ Reports an error identified by ``$message`` if the ``$value`` does not match the
?>

:numref:`appendixes.assertions.assertThat.tables.constraints` shows the
available ``PHPUnit_Framework_Constraint`` classes.
available ``PHPUnit\Framework\Constraint`` classes.

.. rst-class:: table
.. list-table:: Constraints
Expand All @@ -2497,71 +2497,71 @@ available ``PHPUnit_Framework_Constraint`` classes.

* - Constraint
- Meaning
* - ``PHPUnit_Framework_Constraint_Attribute attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)``
* - ``PHPUnit\Framework\Constraint\Attribute attribute(PHPUnit\Framework\Constraint $constraint, $attributeName)``
- Constraint that applies another constraint to an attribute of a class or an object.
* - ``PHPUnit_Framework_Constraint_IsAnything anything()``
* - ``PHPUnit\Framework\Constraint\IsAnything anything()``
- Constraint that accepts any input value.
* - ``PHPUnit_Framework_Constraint_ArrayHasKey arrayHasKey(mixed $key)``
* - ``PHPUnit\Framework\Constraint\ArrayHasKey arrayHasKey(mixed $key)``
- Constraint that asserts that the array it is evaluated for has a given key.
* - ``PHPUnit_Framework_Constraint_TraversableContains contains(mixed $value)``
* - ``PHPUnit\Framework\Constraint\TraversableContains contains(mixed $value)``
- Constraint that asserts that the ``array`` or object that implements the ``Iterator`` interface it is evaluated for contains a given value.
* - ``PHPUnit_Framework_Constraint_TraversableContainsOnly containsOnly(string $type)``
* - ``PHPUnit\Framework\Constraint\TraversableContainsOnly containsOnly(string $type)``
- Constraint that asserts that the ``array`` or object that implements the ``Iterator`` interface it is evaluated for contains only values of a given type.
* - ``PHPUnit_Framework_Constraint_TraversableContainsOnly containsOnlyInstancesOf(string $classname)``
* - ``PHPUnit\Framework\Constraint\TraversableContainsOnly containsOnlyInstancesOf(string $classname)``
- Constraint that asserts that the ``array`` or object that implements the ``Iterator`` interface it is evaluated for contains only instances of a given classname.
* - ``PHPUnit_Framework_Constraint_IsEqual equalTo($value, $delta = 0, $maxDepth = 10)``
* - ``PHPUnit\Framework\Constraint\IsEqual equalTo($value, $delta = 0, $maxDepth = 10)``
- Constraint that checks if one value is equal to another.
* - ``PHPUnit_Framework_Constraint_Attribute attributeEqualTo($attributeName, $value, $delta = 0, $maxDepth = 10)``
* - ``PHPUnit\Framework\Constraint\Attribute attributeEqualTo($attributeName, $value, $delta = 0, $maxDepth = 10)``
- Constraint that checks if a value is equal to an attribute of a class or of an object.
* - ``PHPUnit_Framework_Constraint_DirectoryExists directoryExists()``
* - ``PHPUnit\Framework\Constraint\DirectoryExists directoryExists()``
- Constraint that checks if the directory that it is evaluated for exists.
* - ``PHPUnit_Framework_Constraint_FileExists fileExists()``
* - ``PHPUnit\Framework\Constraint\FileExists fileExists()``
- Constraint that checks if the file(name) that it is evaluated for exists.
* - ``PHPUnit_Framework_Constraint_IsReadable isReadable()``
* - ``PHPUnit\Framework\Constraint\IsReadable isReadable()``
- Constraint that checks if the file(name) that it is evaluated for is readable.
* - ``PHPUnit_Framework_Constraint_IsWritable isWritable()``
* - ``PHPUnit\Framework\Constraint\IsWritable isWritable()``
- Constraint that checks if the file(name) that it is evaluated for is writable.
* - ``PHPUnit_Framework_Constraint_GreaterThan greaterThan(mixed $value)``
* - ``PHPUnit\Framework\Constraint\GreaterThan greaterThan(mixed $value)``
- Constraint that asserts that the value it is evaluated for is greater than a given value.
* - ``PHPUnit_Framework_Constraint_Or greaterThanOrEqual(mixed $value)``
* - ``PHPUnit\Framework\Constraint\Or greaterThanOrEqual(mixed $value)``
- Constraint that asserts that the value it is evaluated for is greater than or equal to a given value.
* - ``PHPUnit_Framework_Constraint_ClassHasAttribute classHasAttribute(string $attributeName)``
* - ``PHPUnit\Framework\Constraint\ClassHasAttribute classHasAttribute(string $attributeName)``
- Constraint that asserts that the class it is evaluated for has a given attribute.
* - ``PHPUnit_Framework_Constraint_ClassHasStaticAttribute classHasStaticAttribute(string $attributeName)``
* - ``PHPUnit\Framework\Constraint\ClassHasStaticAttribute classHasStaticAttribute(string $attributeName)``
- Constraint that asserts that the class it is evaluated for has a given static attribute.
* - ``PHPUnit_Framework_Constraint_ObjectHasAttribute hasAttribute(string $attributeName)``
* - ``PHPUnit\Framework\Constraint\ObjectHasAttribute hasAttribute(string $attributeName)``
- Constraint that asserts that the object it is evaluated for has a given attribute.
* - ``PHPUnit_Framework_Constraint_IsIdentical identicalTo(mixed $value)``
* - ``PHPUnit\Framework\Constraint\IsIdentical identicalTo(mixed $value)``
- Constraint that asserts that one value is identical to another.
* - ``PHPUnit_Framework_Constraint_IsFalse isFalse()``
* - ``PHPUnit\Framework\Constraint\IsFalse isFalse()``
- Constraint that asserts that the value it is evaluated is ``false``.
* - ``PHPUnit_Framework_Constraint_IsInstanceOf isInstanceOf(string $className)``
* - ``PHPUnit\Framework\Constraint\IsInstanceOf isInstanceOf(string $className)``
- Constraint that asserts that the object it is evaluated for is an instance of a given class.
* - ``PHPUnit_Framework_Constraint_IsNull isNull()``
* - ``PHPUnit\Framework\Constraint\IsNull isNull()``
- Constraint that asserts that the value it is evaluated is ``null``.
* - ``PHPUnit_Framework_Constraint_IsTrue isTrue()``
* - ``PHPUnit\Framework\Constraint\IsTrue isTrue()``
- Constraint that asserts that the value it is evaluated is ``true``.
* - ``PHPUnit_Framework_Constraint_IsType isType(string $type)``
* - ``PHPUnit\Framework\Constraint\IsType isType(string $type)``
- Constraint that asserts that the value it is evaluated for is of a specified type.
* - ``PHPUnit_Framework_Constraint_LessThan lessThan(mixed $value)``
* - ``PHPUnit\Framework\Constraint\LessThan lessThan(mixed $value)``
- Constraint that asserts that the value it is evaluated for is smaller than a given value.
* - ``PHPUnit_Framework_Constraint_Or lessThanOrEqual(mixed $value)``
* - ``PHPUnit\Framework\Constraint\Or lessThanOrEqual(mixed $value)``
- Constraint that asserts that the value it is evaluated for is smaller than or equal to a given value.
* - ``logicalAnd()``
- Logical AND.
* - ``logicalNot(PHPUnit_Framework_Constraint $constraint)``
* - ``logicalNot(PHPUnit\Framework\Constraint $constraint)``
- Logical NOT.
* - ``logicalOr()``
- Logical OR.
* - ``logicalXor()``
- Logical XOR.
* - ``PHPUnit_Framework_Constraint_PCREMatch matchesRegularExpression(string $pattern)``
* - ``PHPUnit\Framework\Constraint\PCREMatch matchesRegularExpression(string $pattern)``
- Constraint that asserts that the string it is evaluated for matches a regular expression.
* - ``PHPUnit_Framework_Constraint_StringContains stringContains(string $string, bool $case)``
* - ``PHPUnit\Framework\Constraint\StringContains stringContains(string $string, bool $case)``
- Constraint that asserts that the string it is evaluated for contains a given string.
* - ``PHPUnit_Framework_Constraint_StringEndsWith stringEndsWith(string $suffix)``
* - ``PHPUnit\Framework\Constraint\StringEndsWith stringEndsWith(string $suffix)``
- Constraint that asserts that the string it is evaluated for ends with a given suffix.
* - ``PHPUnit_Framework_Constraint_StringStartsWith stringStartsWith(string $prefix)``
* - ``PHPUnit\Framework\Constraint\StringStartsWith stringStartsWith(string $prefix)``
- Constraint that asserts that the string it is evaluated for starts with a given prefix.

.. _appendixes.assertions.assertTrue:
Expand Down
4 changes: 2 additions & 2 deletions src/code-coverage-analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ generate code coverage with unit tests.
:name: code-coverage-analysis.specifying-covered-methods.examples.GuestbookIntegrationTest.php

<?php
use PHPUnit\Framework\TestCase;
use PHPUnit\DbUnit\TestCase

class GuestbookIntegrationTest extends PHPUnit_Extensions_Database_TestCase
class GuestbookIntegrationTest extends TestCase
{
/**
* @coversNothing
Expand Down
4 changes: 2 additions & 2 deletions src/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ be used to configure PHPUnit's core functionality.
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="PHPUnit_TextUI_ResultPrinter"
printerClass="PHPUnit\TextUI\ResultPrinter"
<!--printerFile="/path/to/ResultPrinter.php"-->
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
stopOnRisky="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
testSuiteLoaderClass="PHPUnit\Runner\StandardTestSuiteLoader"
<!--testSuiteLoaderFile="/path/to/StandardTestSuiteLoader.php"-->
timeoutForSmallTests="1"
timeoutForMediumTests="10"
Expand Down
Loading