Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Yeray Santana Hualde
syncEnrollments
Commits
da9fcd69
Commit
da9fcd69
authored
Jun 11, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed test class
parent
e85e8f95
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
146 deletions
+0
-146
application.php
application/config/application.php
+0
-1
test.php
system/test.php
+0
-65
.gitignore
system/tests/.gitignore
+0
-0
report.php
system/views/test/report.php
+0
-80
No files found.
application/config/application.php
View file @
da9fcd69
...
...
@@ -92,7 +92,6 @@ return array(
'Response'
=>
'System\\Response'
,
'Session'
=>
'System\\Session'
,
'Str'
=>
'System\\Str'
,
'Test'
=>
'System\\Test'
,
'Text'
=>
'System\\Text'
,
'View'
=>
'System\View'
,
),
...
...
system/test.php
deleted
100644 → 0
View file @
e85e8f95
<?php
namespace
System
;
class
Test
{
/**
* All of the test results.
*
* @var array
*/
public
static
$results
=
array
();
/**
* Total number of tests being run.
*
* @var int
*/
public
static
$total
=
0
;
/**
* Total number of passed tests.
*
* @var int
*/
public
static
$passed
=
0
;
/**
* Run a test suite.
*
* @param string $suite
* @param array $tests
* @return void
*/
public
static
function
run
(
$suite
,
$tests
)
{
static
::
$total
=
static
::
$total
+
count
(
$tests
);
// -----------------------------------------------------
// Run each test in the suite.
// -----------------------------------------------------
foreach
(
$tests
as
$name
=>
$test
)
{
if
(
!
is_callable
(
$test
))
{
throw
new
\Exception
(
"Test [
$name
] in suite [
$suite
] is not callable."
);
}
static
::
$passed
=
(
$result
=
call_user_func
(
$test
))
?
static
::
$passed
+
1
:
static
::
$passed
;
static
::
$results
[
$suite
][]
=
array
(
'name'
=>
$name
,
'result'
=>
$result
);
}
}
/**
* Get the test report view.
*
* @return View
*/
public
static
function
report
()
{
return
View
::
make
(
'test/report'
)
->
bind
(
'results'
,
static
::
$results
)
->
bind
(
'passed'
,
static
::
$passed
)
->
bind
(
'total'
,
static
::
$total
);
}
}
\ No newline at end of file
system/tests/.gitignore
deleted
100644 → 0
View file @
e85e8f95
system/views/test/report.php
deleted
100644 → 0
View file @
e85e8f95
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Laravel - Test Report
</title>
<link
href=
'http://fonts.googleapis.com/css?family=Ubuntu&subset=latin'
rel=
'stylesheet'
type=
'text/css'
>
<style
type=
"text/css"
>
body
{
background-color
:
#fff
;
font-family
:
'Ubuntu'
,
sans-serif
;
font-size
:
18px
;
color
:
#3f3f3f
;
padding
:
10px
;
}
h1
{
font-size
:
35px
;
color
:
#6d6d6d
;
margin
:
0
0
10px
0
;
text-shadow
:
1px
1px
#000
;
}
h2
{
font-size
:
25px
;
color
:
#6d6d6d
;
text-shadow
:
1px
1px
#000
;
}
h3
{
font-size
:
20px
;
color
:
#6d6d6d
;
text-shadow
:
1px
1px
#000
;
}
#wrapper
{
width
:
100%
;
}
div
.content
{
padding
:
10px
10px
10px
10px
;
background-color
:
#eee
;
border-radius
:
10px
;
margin-bottom
:
10px
;
}
div
.basic
{
background-color
:
#eee
;
}
div
.passed
{
background-color
:
#d8f5cf
;
}
div
.failed
{
background-color
:
#ffebe8
;
}
</style>
</head>
<body>
<div
id=
"wrapper"
>
<h1>
Test Report
</h1>
<h2>
Passed
<?php
echo
$passed
;
?>
/
<?php
echo
$total
;
?>
Tests
</h2>
<?php
foreach
(
$results
as
$suite
=>
$results
)
:
?>
<h3>
<?php
echo
$suite
;
?>
</h3>
<?php
foreach
(
$results
as
$result
)
:
?>
<div
class=
"content
<?php
echo
(
$result
[
'result'
])
?
'passed'
:
'failed'
;
?>
"
>
<strong>
<?php
echo
(
$result
[
'result'
])
?
'Passed'
:
'Failed'
;
?>
:
</strong>
<?php
echo
$result
[
'name'
];
?>
</div>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</div>
</body>
</html>
\ No newline at end of file
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