public function lazyRead() { $p = new Properties('@@does-not-exist.ini@@'); // This cannot be done via expect annotation because it would also catch if // an exception was thrown from util.Properties' constructor. We explicitely // want the exception to be thrown later on! try { $p->readString('section', 'key'); $this->fail('Expected exception not thrown', null, 'io.IOException'); } catch (IOException $expected) { \xp::gc(); } }
public function throws_error_when_reading() { $p = new Properties('@@does-not-exist.ini@@'); $p->readString('section', 'key'); }