Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
09d4b74c
Commit
09d4b74c
authored
Jan 27, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added core option to test runner.
parent
f706ed75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
laravel/cli/tasks/test/runner.php
+38
-7
No files found.
laravel/cli/tasks/test/runner.php
View file @
09d4b74c
...
...
@@ -17,20 +17,51 @@ class Runner extends Task {
}
/**
* Run the tests for the Laravel framework.
*
* @return void
*/
public
function
core
()
{
if
(
!
is_dir
(
BUNDLE_PATH
.
'laravel-tests'
))
{
throw
new
\Exception
(
"The bundle [laravel-tests] has not been installed!"
);
}
// When testing the Laravel core, we will just stub the path directly
// so the test bundle is not required to be registered in the bundle
// configuration, as it is kind of a unique bundle.
$this
->
stub
(
BUNDLE_PATH
.
'laravel-tests/cases'
);
$this
->
test
();
}
/**
* Run the tests for a given bundle.
*
* @param array $arguments
* @return void
*/
public
function
bundle
(
$
argument
s
=
array
())
public
function
bundle
(
$
bundle
s
=
array
())
{
// To run PHPUnit for the application, bundles, and the framework
// from one task, we'll dynamically stub PHPUnit.xml files via
// the task and point the test suite to the correct directory
// based on what was requested.
$this
->
stub
(
Bundle
::
path
(
$arguments
[
0
])
.
'tests'
);
if
(
count
(
$bundles
)
==
0
)
{
$bundles
=
Bundle
::
names
();
}
$this
->
test
();
foreach
(
$bundles
as
$bundle
)
{
// To run PHPUnit for the application, bundles, and the framework
// from one task, we'll dynamically stub PHPUnit.xml files via
// the task and point the test suite to the correct directory
// based on what was requested.
if
(
is_dir
(
$path
=
Bundle
::
path
(
$bundle
)
.
'tests'
))
{
$this
->
stub
(
$path
);
$this
->
test
();
}
}
}
/**
...
...
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