PHPUnit_Framework_Assert::assertAttributeInstanceOf PHP Method

assertAttributeInstanceOf() public static method

Asserts that an attribute is of a given type.
public static assertAttributeInstanceOf ( string $expected, string $attributeName, string | object $classOrObject, string $message = '' )
$expected string
$attributeName string
$classOrObject string | object
$message string
    public static function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
    {
        static::assertInstanceOf($expected, static::readAttribute($classOrObject, $attributeName), $message);
    }

Usage Example

 /**
  * Test the semantic() function
  *
  * @expectedException ErrorException
  *
  * @return  void
  */
 public function testSemantic()
 {
     $this->handler = new ParserPlugin('doesNotExist');
     $this->handler = new ParserPlugin('Microdata');
     PHPUnit_Framework_Assert::assertAttributeInstanceOf('PHPMicrodata', 'handler', $this->handler);
     $this->handler = new ParserPlugin('RDFa');
     PHPUnit_Framework_Assert::assertAttributeInstanceOf('PHPRDFa', 'handler', $this->handler);
 }
All Usage Examples Of PHPUnit_Framework_Assert::assertAttributeInstanceOf
PHPUnit_Framework_Assert