add( 'unit-tests', 'this is a message' ); $this->assertEquals( date( 'm-d-Y @ H:i:s' ) . ' - this is a message' . PHP_EOL, $this->read_content( 'unit-tests' ) ); } /** * Test clear() * * @since 2.4 */ public function test_clear() { $log = new \WC_Logger(); $log->add( 'unit-tests', 'this is a message' ); $log->clear( 'unit-tests' ); $this->assertEquals( '', $this->read_content( 'unit-tests' ) ); } }