v4:
PHP
JAVA
Python
.NET
v3:
PHP
JAVA
Python
Ruby
.NET
NodeJS
ParserFactoryTest.php
1
<?php
2
3
namespace
tests\Udger;
4
5
use
Udger\ParserFactory
;
6
7
class
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
}
Udger\ParserFactory
Definition:
ParserFactory.php:14
tests\Udger\ParserFactoryTest
Definition:
ParserFactoryTest.php:7
GitHub
udger-php
tests
unit
ParserFactoryTest.php
Generated by
1.9.3