function assertFormat($input, $expect) { $result = coder_format_string_all($input); $this->assertIdentical($result, $input); }
/** * Implements SimpleExpectation::test(). * * @param $filename Filename of test file to test. */ function test($filename = false) { if ($filename) { $this->load($filename); } // Perform test. // Test passes until proven invalid. $valid = TRUE; foreach ($this->input as $unit => $content) { // Parse input and store results. $this->actual[$unit] = coder_format_string_all($this->input[$unit]); // Let this test fail, if a unit fails. if ($this->expect[$unit] !== $this->actual[$unit]) { $valid = FALSE; } } return $valid; }