### Question:
PHPMethods { public static double log(double d, double base) { if(base==1.0 || base<=0.0) { throw new IllegalArgumentException("Invalid base for logarithm."); } return Math.log(d)/Math.log(base); }  static String ltrim(String s); static String rtrim(String s); static int substr_count(final String string, final String substring); static int substr_count(final String string, final char character); static String preg_replace(String regex, String replacement, String subject); static String preg_replace(Pattern pattern, String replacement, String subject); static int preg_match(String regex, String subject); static int preg_match(Pattern pattern, String subject); static double round(double d, int i); static double log(double d, double base); static int mt_rand(); static int mt_rand(int min, int max); static double mt_rand(double min, double max); static Map<V,K> array_flip(Map<K,V> map); static void shuffle(T[] array); static void shuffle(T[] array, Random rnd); static Integer[] asort(T[] array); static Integer[] arsort(T[] array); static void arrangeByIndex(T[] array, Integer[] indexes); static double[] array_clone(double[] a); static double[][] array_clone(double[][] a);  }### Answer:
@Test public void testLog() { logger.info("log"); double d = 100.0; double base = 10.0; double expResult = 2.0; double result = PHPMethods.log(d, base); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); }