invalidFileNames as $value) { try { HelperClass::fileExists($value); } catch (\InvalidArgumentException $e) { // Good, we got an exception! continue; } $this->fail('Expected exception not raised on value: "' . $value . '".'); } foreach ($this->validFileNames as $value) { HelperClass::fileExists($value); } } public function testIsInPhar(){ if(HelperClass::isInPhar()){ $this->fail("unit test is in phar?"); } } }