ParserFactoryTest.php
1<?php
2
3namespace tests\Udger;
4
6
7class ParserFactoryTest extends \Codeception\TestCase\Test {
8
12 protected $guy;
13
18 protected $factory;
19
20 protected function _before()
21 {
22 $this->factory = new ParserFactory("/dev/null");
23 }
24
25 public function testGetParser()
26 {
27 $this->assertInstanceOf("Udger\Parser", $this->factory->getParser());
28 }
29
30 public function testNewFactoryWithoutPathShouldFail()
31 {
32 $this->setExpectedException('PHPUnit_Framework_Exception');
33 new ParserFactory();
34 }
35}