prophesize('DateTime'); $dateTime->format(DateTime::ISO8601)->willReturn("ISODATE"); $dateTime->format(DateTime::RFC2822)->willReturn("RFCDATE"); $this->assertEquals('', Lang::formatDateTime($dateTime->reveal(), 'FORMAT')); } public function testLang_UseDefaultFormat() { $dateTime = $this->prophesize('DateTime'); $dateTime->format(DateTime::ISO8601)->willReturn("ISODATE"); $dateTime->format(DateTime::RFC2822)->willReturn("RFCDATE"); $this->assertEquals('', Lang::formatDateTime($dateTime->reveal())); } /** * @return array */ public function localizationsProvider() { $directory = SRC_DIR . 'Languages' . DIRECTORY_SEPARATOR; $languages = []; foreach(glob($directory . '*') as $file) { $language = include($file); $languages[$file] = [ $language ]; } return $languages; } /** * @dataProvider localizationsProvider */ /*public function testLocalizations(array $strings) { $directory = SRC_DIR . 'Languages' . DIRECTORY_SEPARATOR; $en = include($directory . 'lang.en.php'); foreach ($en as $enIndex => $enString) { $this->assertArrayHasKey($enIndex, $strings); } }*/ }