|
@@ 193-198 (lines=6) @@
|
| 190 |
|
/** |
| 191 |
|
* Test setChanges error. |
| 192 |
|
*/ |
| 193 |
|
public function testSetChanges_error1() { |
| 194 |
|
$entry = new ChangelogEntry( '1.0' ); |
| 195 |
|
$this->expectException( InvalidArgumentException::class ); |
| 196 |
|
$this->expectExceptionMessage( 'Automattic\\Jetpack\\Changelog\\ChangelogEntry::setChanges: Expected a ChangeEntry, got NULL at index 0' ); |
| 197 |
|
$entry->setChanges( array( null ) ); |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
/** |
| 201 |
|
* Test setChanges error. |
|
@@ 203-208 (lines=6) @@
|
| 200 |
|
/** |
| 201 |
|
* Test setChanges error. |
| 202 |
|
*/ |
| 203 |
|
public function testSetChanges_error2() { |
| 204 |
|
$entry = new ChangelogEntry( '1.0' ); |
| 205 |
|
$this->expectException( InvalidArgumentException::class ); |
| 206 |
|
$this->expectExceptionMessage( 'Automattic\\Jetpack\\Changelog\\ChangelogEntry::setChanges: Expected a ChangeEntry, got Automattic\\Jetpack\\Changelog\\ChangelogEntry at index 0' ); |
| 207 |
|
$entry->setChanges( array( $entry ) ); |
| 208 |
|
} |
| 209 |
|
|
| 210 |
|
/** |
| 211 |
|
* Test JSON serialization. |