-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sebastianbergmann
Author
Owner
|
||
############### | ||
|
||
``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() | ||
############## | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@sebastianbergmann is
assertIsArray()
deprecated? I still see it in some of the other language docs.