|
@@ 2028-2041 (lines=14) @@
|
| 2025 |
|
/** |
| 2026 |
|
* @covers PHPUnit_Framework_Assert::assertAttributeContainsOnly |
| 2027 |
|
*/ |
| 2028 |
|
public function testAssertPublicAttributeContainsOnly() |
| 2029 |
|
{ |
| 2030 |
|
$obj = new ClassWithNonPublicAttributes; |
| 2031 |
|
|
| 2032 |
|
$this->assertAttributeContainsOnly('string', 'publicArray', $obj); |
| 2033 |
|
|
| 2034 |
|
try { |
| 2035 |
|
$this->assertAttributeContainsOnly('integer', 'publicArray', $obj); |
| 2036 |
|
} catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 2037 |
|
return; |
| 2038 |
|
} |
| 2039 |
|
|
| 2040 |
|
$this->fail(); |
| 2041 |
|
} |
| 2042 |
|
|
| 2043 |
|
/** |
| 2044 |
|
* @covers PHPUnit_Framework_Assert::assertAttributeNotContains |
|
@@ 2064-2077 (lines=14) @@
|
| 2061 |
|
/** |
| 2062 |
|
* @covers PHPUnit_Framework_Assert::assertAttributeNotContainsOnly |
| 2063 |
|
*/ |
| 2064 |
|
public function testAssertPublicAttributeNotContainsOnly() |
| 2065 |
|
{ |
| 2066 |
|
$obj = new ClassWithNonPublicAttributes; |
| 2067 |
|
|
| 2068 |
|
$this->assertAttributeNotContainsOnly('integer', 'publicArray', $obj); |
| 2069 |
|
|
| 2070 |
|
try { |
| 2071 |
|
$this->assertAttributeNotContainsOnly('string', 'publicArray', $obj); |
| 2072 |
|
} catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 2073 |
|
return; |
| 2074 |
|
} |
| 2075 |
|
|
| 2076 |
|
$this->fail(); |
| 2077 |
|
} |
| 2078 |
|
|
| 2079 |
|
/** |
| 2080 |
|
* @covers PHPUnit_Framework_Assert::assertAttributeContains |