<?php /* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */ // +--------------------------------------------------------------------+ // | 调用入口 | // +--------------------------------------------------------------------+ // | Copyright (c) 2010 Taobao.com. All Rights Reserved | // +--------------------------------------------------------------------+ // | Author: pengchun <*****@*****.**> | // +--------------------------------------------------------------------+ // // $Id: run.php 48 2010-12-20 15:58:11Z pengchun $ require_once __DIR__ . '/../app/daemon.php'; \Myfox\App\Daemon::run(__DIR__ . '/../etc/myfox.ini', $_SERVER['argv']);
public function test_should_parse_option_works_fine() { $this->assertEquals(array('a' => 1, 'b' => 2, 'c' => true, 'f' => 0, 'data' => 2, 'debug' => true, 'eof' => 'abcdefg'), Daemon::parse(array('-a', '1', '-b2', '-c', '-f0', '--data', '2', '--debug', '--eof=abcdefg'))); }
public function test_should_daemon_lock_works_fine() { Daemon::run(self::$inifile, array('script', 'test', '--locker', 'test loCkeR ', '--sleep=1')); Daemon::run(self::$inifile, array('script', 'test', '--locker', 'test locker', '--sleep=1')); }