Skip to content

Commit 9d78c92

Browse files
More work on the test.
1 parent f4aa00a commit 9d78c92

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed

Tests/PHP/CodeCoverage/Report/FactoryTest.php

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,71 @@ public function testSomething()
8585
$this->assertEquals(75, $root->getTestedMethodsPercent());
8686
$this->assertEquals(50, $root->getLineExecutedPercent());
8787
$this->assertEquals(0, $root->getNumFunctions());
88-
$this->assertEquals(0, $root->getNumFunctions());
88+
$this->assertEquals(0, $root->getNumTestedFunctions());
89+
$this->assertNull($root->getParent());
90+
$this->assertEquals(array(), $root->getDirectories());
91+
#$this->assertEquals(array(), $root->getFiles());
92+
#$this->assertEquals(array(), $root->getChildNodes());
93+
94+
$this->assertEquals(
95+
array(
96+
'BankAccount' => array(
97+
'methods' => array(
98+
'getBalance' => array(
99+
'signature' => 'getBalance()',
100+
'startLine' => 6,
101+
'executableLines' => 1,
102+
'executedLines' => 1,
103+
'ccn' => 1,
104+
'coverage' => 100,
105+
'crap' => '1'
106+
),
107+
'setBalance' => array(
108+
'signature' => 'setBalance($balance)',
109+
'startLine' => 11,
110+
'executableLines' => 5,
111+
'executedLines' => 0,
112+
'ccn' => 2,
113+
'coverage' => 0,
114+
'crap' => 6
115+
),
116+
'depositMoney' => array(
117+
'signature' => 'depositMoney($balance)',
118+
'startLine' => 20,
119+
'executableLines' => 2,
120+
'executedLines' => 2,
121+
'ccn' => 1,
122+
'coverage' => 100,
123+
'crap' => '1'
124+
),
125+
'withdrawMoney' => array(
126+
'signature' => 'withdrawMoney($balance)',
127+
'startLine' => 27,
128+
'executableLines' => 2,
129+
'executedLines' => 2,
130+
'ccn' => 1,
131+
'coverage' => 100,
132+
'crap' => '1'
133+
),
134+
),
135+
'startLine' => 2,
136+
'executableLines' => 10,
137+
'executedLines' => 5,
138+
'ccn' => 5,
139+
'coverage' => 50,
140+
'crap' => '8.12',
141+
'package' => array(
142+
'namespace' => '',
143+
'fullPackage' => '',
144+
'category' => '',
145+
'package' => '',
146+
'subpackage' => ''
147+
)
148+
)
149+
),
150+
$root->getClasses()
151+
);
152+
153+
$this->assertEquals(array(), $root->getFunctions());
89154
}
90155
}

0 commit comments

Comments
 (0)