File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ public function testNeed()
4141
4242 public function testRun ()
4343 {
44- $ logger = new \Monolog \Logger (new \Monolog \Handler \StreamHandler ($ this ->log_file ));
44+ $ stream = new \Monolog \Handler \StreamHandler ($ this ->log_file );
45+ $ logger = new \Monolog \Logger ($ stream );
4546
4647 $ this ->mission = new \Jenner \Crontab \Mission (
4748 "mission_test " ,
@@ -52,6 +53,7 @@ public function testRun()
5253
5354 $ this ->mission ->start ();
5455 $ this ->mission ->wait ();
56+
5557 $ this ->assertEquals ($ this ->mission ->errno (), 0 );
5658 $ out = file_get_contents ($ this ->log_file );
5759 $ except = shell_exec ("ls / " );
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Created by PhpStorm.
4+ * User: Jenner
5+ * Date: 2016/7/9
6+ * Time: 9:29
7+ */
8+
9+ require dirname (dirname (__FILE__ )) . DIRECTORY_SEPARATOR . 'vendor ' . DIRECTORY_SEPARATOR . 'autoload.php ' ;
10+
11+ $ logger = new \Monolog \Logger (new \Monolog \Handler \StreamHandler ("/tmp/monolog.log " ));
12+ $ logger ->info ("test " );
You can’t perform that action at this time.
0 commit comments