public function testResource() { $t = new MethodArgs(); $t->setResourceStrict(STDIN); $this->assertSame(STDIN, $t->a); $this->setExpectedException('\\Exception'); $t->setResourceStrict(true); }
public function testResource() { $t = new MethodArgs(); $t->setResourceStrict(STDIN); $this->assertSame(STDIN, $t->a); if (!method_exists('PHPUnit_Runner_Version', 'id') || version_compare(\PHPUnit_Runner_Version::id(), '5.2.0', '<')) { $this->setExpectedException('\\Exception'); } else { $this->expectException('\\Exception'); } $t->setResourceStrict(true); }