/** * @depends test_default */ function test_format() { // Test changing the format string and write again Analog::$format = "%s, %s, %d, %s\n"; Analog::log('Foo'); $this->assertStringMatchesFormat("localhost, %d-%d-%d %d:%d:%d, 3, Foo\n", file_get_contents(Analog::handler())); unlink(Analog::handler()); }
/** * @depends test_default */ function test_format() { // Test changing the format string and write again Analog::$format = "%s, %s, %d, %s\n"; Analog::log('Foo'); $this->assertEquals(sprintf("%s, %s, %d, %s\n", 'localhost', gmdate('Y-m-d H:i:s'), 3, 'Foo'), file_get_contents(Analog::handler())); unlink(Analog::handler()); }