assertNotInstanceOf() public static method

Asserts that a variable is not of a given type.
public static assertNotInstanceOf ( string $expected, mixed $actual, string $message = '' )
$expected string
$actual mixed
$message string
Example #1
0
/**
 * Asserts that a variable is not of a given type.
 *
 * @param string $expected
 * @param mixed  $actual
 * @param string $message
 * @since Method available since Release 3.5.0
 */
function assertNotInstanceOf($expected, $actual, $message = '')
{
    return PHPUnit_Framework_Assert::assertNotInstanceOf($expected, $actual, $message);
}
Example #2
0
 public function toBeInstanceOf($class)
 {
     if ($this->negate) {
         a::assertNotInstanceOf($class, $this->actual);
     } else {
         a::assertInstanceOf($class, $this->actual);
     }
 }
Example #3
0
 public function isNotInstanceOf($class)
 {
     a::assertNotInstanceOf($class, $this->actual, $this->description);
 }
Example #4
0
 /**
  * Expect that a variable is not of a given type.
  *
  * @param string $expected
  * @param string $message
  *
  * @return Expect
  */
 public function notToBeInstanceOf($expected, $message = '')
 {
     Assert::assertNotInstanceOf($expected, $this->value, $message);
     return $this;
 }
Example #5
0
 public function isNotInstanceOf($class)
 {
     Assert::assertNotInstanceOf($class, $this->actual, $this->description);
     return $this;
 }
Example #6
0
 /**
  * @param $class
  * @param $actual
  * @param $description
  */
 protected function assertNotInstanceOf($class, $actual, $description)
 {
     \PHPUnit_Framework_Assert::assertNotInstanceOf($class, $actual, $description);
 }