Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
5b4c4ffd
Commit
5b4c4ffd
authored
Jul 16, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more efficient memory handling
parent
9ad3a0fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
26 deletions
+12
-26
Test.php
tests/Test.php
+12
-26
No files found.
tests/Test.php
View file @
5b4c4ffd
<?php
class
GroupTest
class
GroupTest
extends
UnitTestCase
{
protected
$_testCases
=
array
();
...
...
@@ -16,42 +16,28 @@ class GroupTest
}
public
function
run
(
HtmlReporter
$reporter
)
{
foreach
(
$this
->
_testCases
as
$testCase
)
{
foreach
(
$this
->
_testCases
as
$
k
=>
$
testCase
)
{
$testCase
->
run
();
$this
->
_passed
+=
$testCase
->
getPassCount
();
$this
->
_failed
+=
$testCase
->
getFailCount
();
$this
->
_messages
+=
$testCase
->
getMessages
();
$this
->
_testCases
[
$k
]
=
null
;
}
$reporter
->
setTestCase
(
$this
);
$reporter
->
paintHeader
();
$reporter
->
paintFooter
();
}
public
function
getMessages
()
{
$messages
=
array
();
foreach
(
$this
->
_testCases
as
$testCase
)
{
$messages
=
array_merge
(
$messages
,
$testCase
->
getMessages
());
}
return
$messages
;
}
public
function
getFailCount
()
{
$fails
=
0
;
foreach
(
$this
->
_testCases
as
$testCase
)
{
$fails
+=
$testCase
->
getFailCount
();
}
return
$fails
;
}
public
function
getTestCaseCount
()
{
return
count
(
$this
->
_testCases
);
}
public
function
getPassCount
()
{
$passes
=
0
;
foreach
(
$this
->
_testCases
as
$testCase
)
{
$passes
+=
$testCase
->
getPassCount
();
}
return
$passes
;
}
}
class
HtmlReporter
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment