function check_date(FuelDocs $docs_en, FuelDocs $docs_ja) { foreach ($docs_en as $file => $val) { $date_en = new DateTime($docs_en->getDate($file)); $date_ja = new DateTime($docs_ja->getDate($file)); if ($date_en >= $date_ja) { echo $file, ' : en ', $date_en->format('Y-m-d H:m:s O'), ' ja ', $date_ja->format('Y-m-d H:m:s O'), PHP_EOL; $error = true; } } if ($error) { exit(1); } }
public function test_prepContents_h4() { $contents = <<<'EOL' <article> <h4 class="method" id="method_is_multi">is_multi($arr, $all_keys = false)</h4> <p>The <strong>is_multi</strong> method checks if the array passed is multi-dimensional array or not.</p> EOL; $test = FuelDocs::prepContents($contents); $expected = <<<'EOL' The is_multi method checks if the array passed is multi-dimensional array or not. EOL; $this->assertEquals($expected, $test); }