1 | <?php |
||
16 | class RemoveOldLogEntriesTaskTest extends SapphireTest |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritDoc} |
||
20 | */ |
||
21 | protected $usesDatabase = true; |
||
22 | |||
23 | /** |
||
24 | * {@inheritDoc} |
||
25 | */ |
||
26 | protected static $fixture_file = 'RemoveOldLogEntriesTaskTest.yml'; |
||
27 | |||
28 | /** |
||
29 | * {@inheritDoc} |
||
30 | */ |
||
31 | public function setUp() |
||
37 | |||
38 | /** |
||
39 | * Test that the configuration properties are set correctly |
||
40 | */ |
||
41 | public function testClassProperties() |
||
48 | |||
49 | /** |
||
50 | * Test that the max log age, cron schedule and cron enabled can be set via YAML configuration |
||
51 | * |
||
52 | * @dataProvider configurableSettingsProvider |
||
53 | */ |
||
54 | public function testSettingsAreConfigurable($getter, $setting, $value) |
||
59 | |||
60 | /** |
||
61 | * @return array[] |
||
62 | */ |
||
63 | public function configurableSettingsProvider() |
||
71 | |||
72 | /** |
||
73 | * Test that when in the cron context and the cron task is disabled that nothing happens |
||
74 | */ |
||
75 | public function testNothingHappensInCronContextIfCronIsDisabled() |
||
90 | |||
91 | /** |
||
92 | * Test that old log entries are removed from the database according to the max age setting |
||
93 | * |
||
94 | * @covers ::run |
||
95 | * @covers ::process |
||
96 | */ |
||
97 | public function testRemoveOldLogEntries() |
||
108 | |||
109 | /** |
||
110 | * {@inheritDoc} |
||
111 | */ |
||
112 | public function tearDown() |
||
117 | } |
||
118 |