From c57dfc631caf98df46ac014812f962863f0bfa61 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 19 Sep 2017 19:50:59 +0200 Subject: engelsystem_provider should not be loaded in phpunit, changed dir structure --- tests/Feature/model/LogEntriesModelTest.php | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/Feature/model/LogEntriesModelTest.php (limited to 'tests/Feature/model/LogEntriesModelTest.php') diff --git a/tests/Feature/model/LogEntriesModelTest.php b/tests/Feature/model/LogEntriesModelTest.php new file mode 100644 index 00000000..6d7b0ebc --- /dev/null +++ b/tests/Feature/model/LogEntriesModelTest.php @@ -0,0 +1,38 @@ +assertNotFalse(LogEntry_create(LogLevel::WARNING, 'test_LogEntry_create')); + + // There should be one more log entry now + $this->assertEquals(count(LogEntries()), $count + 1); + } + + public function testClearAllLogEntries() + { + LogEntry_create(LogLevel::WARNING, 'test'); + $this->assertTrue(count(LogEntries()) > 0); + + $this->assertNotFalse(LogEntries_clear_all()); + $this->assertCount(0, LogEntries()); + } + + public function tearDown() + { + LogEntries_clear_all(); + } +} -- cgit v1.2.3-70-g09d2