/** * @expectedException \InvalidArgumentException */ public function testRemoveConstantThrowsExceptionWhenConstantDoesNotExist() { $class = new PhpClass(); $class->removeConstant('foo'); }