comparison core/tests/Drupal/Tests/Component/Serialization/YamlPeclTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
85 * Tests that invalid YAML throws an exception. 85 * Tests that invalid YAML throws an exception.
86 * 86 *
87 * @covers ::errorHandler 87 * @covers ::errorHandler
88 */ 88 */
89 public function testError() { 89 public function testError() {
90 $this->setExpectedException(InvalidDataTypeException::class); 90 if (method_exists($this, 'expectException')) {
91 $this->expectException(InvalidDataTypeException::class);
92 }
93 else {
94 $this->setExpectedException(InvalidDataTypeException::class);
95 }
91 YamlPecl::decode('foo: [ads'); 96 YamlPecl::decode('foo: [ads');
92 } 97 }
93 98
94 } 99 }