Skip to content

Commit

Permalink
Do not mention assertions that are deprecated as of PHPUnit 7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 9, 2019
1 parent 637bfcc commit 0af0a29
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions src/assertions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ Reports an error identified by ``$message`` if ``$needle`` is not an element of

``assertNotContains()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeContains()`` and ``assertAttributeNotContains()`` are convenience wrappers that use a ``public``, ``protected``, or ``private`` attribute of a class or object as the haystack.

.. code-block:: php
:caption: Usage of assertContains()
:name: appendixes.assertions.assertContains.example
Expand Down Expand Up @@ -363,8 +361,6 @@ Reports an error identified by ``$message`` if ``$haystack`` does not contain on

``assertNotContainsOnly()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeContainsOnly()`` and ``assertAttributeNotContainsOnly()`` are convenience wrappers that use a ``public``, ``protected``, or ``private`` attribute of a class or object as the haystack.

.. code-block:: php
:caption: Usage of assertContainsOnly()
:name: appendixes.assertions.assertContainsOnly.example
Expand Down Expand Up @@ -640,8 +636,6 @@ Reports an error identified by ``$message`` if ``$actual`` is not empty.

``assertNotEmpty()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeEmpty()`` and ``assertAttributeNotEmpty()`` are convenience wrappers that can be applied to a ``public``, ``protected``, or ``private`` attribute of a class or object.

.. code-block:: php
:caption: Usage of assertEmpty()
:name: appendixes.assertions.assertEmpty.example
Expand Down Expand Up @@ -799,8 +793,6 @@ Reports an error identified by ``$message`` if the two variables ``$expected`` a

``assertNotEquals()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeEquals()`` and ``assertAttributeNotEquals()`` are convenience wrappers that use a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertEquals()
:name: appendixes.assertions.assertEquals.example
Expand Down Expand Up @@ -1312,8 +1304,6 @@ assertGreaterThan()

Reports an error identified by ``$message`` if the value of ``$actual`` is not greater than the value of ``$expected``.

``assertAttributeGreaterThan()`` is a convenience wrapper that uses a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertGreaterThan()
:name: appendixes.assertions.assertGreaterThan.example
Expand Down Expand Up @@ -1357,8 +1347,6 @@ assertGreaterThanOrEqual()

Reports an error identified by ``$message`` if the value of ``$actual`` is not greater than or equal to the value of ``$expected``.

``assertAttributeGreaterThanOrEqual()`` is a convenience wrapper that uses a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertGreaterThanOrEqual()
:name: appendixes.assertions.assertGreaterThanOrEqual.example
Expand Down Expand Up @@ -1451,8 +1439,6 @@ Reports an error identified by ``$message`` if ``$actual`` is not an instance of

``assertNotInstanceOf()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeInstanceOf()`` and ``assertAttributeNotInstanceOf()`` are convenience wrappers that can be applied to a ``public``, ``protected``, or ``private`` attribute of a class or object.

.. code-block:: php
:caption: Usage of assertInstanceOf()
:name: appendixes.assertions.assertInstanceOf.example
Expand Down Expand Up @@ -1488,50 +1474,6 @@ Reports an error identified by ``$message`` if ``$actual`` is not an instance of
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
.. _appendixes.assertions.assertInternalType:

assertIsArray()

This comment has been minimized.

Copy link
@jonnylink

jonnylink Aug 16, 2019

@sebastianbergmann is assertIsArray() deprecated? I still see it in some of the other language docs.

This comment has been minimized.

Copy link
@sebastianbergmann

sebastianbergmann Aug 16, 2019

Author Owner

I only work on the English version of the documentation, sorry.

This comment has been minimized.

Copy link
@jonnylink

jonnylink Aug 17, 2019

So it's definitely deprecated then? I just can't find any list of deprecated functions or mention of it being deprecated besides this commit. Not asking for a reason or upset, just trying to advise people I work with.

This comment has been minimized.

Copy link
@jonnylink

jonnylink Aug 17, 2019

I'm just confused because it looks like assertIsArray() was added, not removed in 7.5

###############

``assertIsArray($actual[, $message = ''])``

Reports an error identified by ``$message`` if ``$actual`` is not of type ``array``.

``assertIsNotArray()`` is the inverse of this assertion and takes the same arguments.

.. code-block:: php
:caption: Usage of assertIsArray()
:name: appendixes.assertions.assertIsArray.example
<?php
use PHPUnit\Framework\TestCase;
class ArrayTest extends TestCase
{
public function testFailure()
{
$this->assertIsArray(null);
}
}
.. code-block:: bash
$ phpunit ArrayTest
PHPUnit |version|.0 by Sebastian Bergmann and contributors.
F
Time: 0 seconds, Memory: 5.00Mb
There was 1 failure:
1) ArrayTest::testFailure
Failed asserting that null is of type "array".
/home/sb/ArrayTest.php:8
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
assertIsBool()
##############
Expand Down Expand Up @@ -2212,8 +2154,6 @@ assertLessThan()

Reports an error identified by ``$message`` if the value of ``$actual`` is not less than the value of ``$expected``.

``assertAttributeLessThan()`` is a convenience wrapper that uses a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertLessThan()
:name: appendixes.assertions.assertLessThan.example
Expand Down Expand Up @@ -2258,8 +2198,6 @@ assertLessThanOrEqual()

Reports an error identified by ``$message`` if the value of ``$actual`` is not less than or equal to the value of ``$expected``.

``assertAttributeLessThanOrEqual()`` is a convenience wrapper that uses a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertLessThanOrEqual()
:name: appendixes.assertions.assertLessThanOrEqual.example
Expand Down Expand Up @@ -2631,8 +2569,6 @@ Reports an error identified by ``$message`` if the two variables ``$expected`` a

``assertNotSame()`` is the inverse of this assertion and takes the same arguments.

``assertAttributeSame()`` and ``assertAttributeNotSame()`` are convenience wrappers that use a ``public``, ``protected``, or ``private`` attribute of a class or object as the actual value.

.. code-block:: php
:caption: Usage of assertSame()
:name: appendixes.assertions.assertSame.example
Expand Down

0 comments on commit 0af0a29

Please sign in to comment.