require_once DIRTEST."/global.php"; /** * @file * @brief */ class Tax_SummaryTest extends TestCase { /** * @var Acc_Account */ protected $object; /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp():void { global $g_connection; $g_connection=Dossier::connect(); $this->object=new \Tax_Summary($g_connection, "01.01.2014", "31.12.2019"); } function testCheck() { // No warning expected try { $this->object->check(); $this->assertTrue(TRUE); } catch (Exception $e) { $this->assertSame('OK', $e->getMessage()); } // Warning expected try { $this->object->set_date_start("01.01.2090"); $this->object->check(); $this->assertTrue(FALSE); } catch (Exception $e) { $this->assertTrue(TRUE); } } function testDisplay() { global $g_connection,$g_user; $g_user=new Noalyss_user($g_connection); $this->expectOutputRegex("/.*0,00.*\<\/tr\>\<\/table\>\n/"); $this->object->display(); } function testForm_export_csv() { $this->expectOutputRegex("/\