18 protected function _before()
20 $this->parser = new \Udger\Parser(
21 \Codeception\Util\Stub::makeEmpty(
"Psr\Log\LoggerInterface"),
22 \Codeception\Util\Stub::makeEmpty(
"Udger\Helper\IP"));
23 #$this->parser->setAccessKey("udger-php-unit");
24 $this->parser->setDataFile(
"/dev/null");
27 protected function _after()
33 public function testSetDataFile()
35 $this->setExpectedException(
"Exception");
36 $this->assertTrue($this->parser->setDataFile(
"/this/is/a/missing/path"));
39 public function testSetAccessKey()
41 $this->assertTrue($this->parser->setAccessKey(
"123456"));
44 public function testSetUA()
46 $this->assertTrue($this->parser->setUA(
"agent"));
49 public function testSetIP()
51 $this->assertTrue($this->parser->setIP(
"0.0.0.0"));
54 public function testParse()
56 #$this->setExpectedException("Exception");
57 $this->parser->parse();
60 public function testAccount()
62 $this->setExpectedException(
"Exception");
63 $this->parser->account(
"test key");