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
f420ec55
Commit
f420ec55
authored
Jan 27, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving core tests into bundle.
parent
8325f6dc
Changes
54
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
14 additions
and
2588 deletions
+14
-2588
build.xml
build.xml
+9
-0
phpunit.php
phpunit.php
+4
-7
phpunit.xml
phpunit.xml
+1
-1
.gitignore
tests/application/.gitignore
+0
-0
.gitignore
tests/bundles/.gitignore
+0
-0
asset.test.php
tests/cases/laravel/asset.test.php
+0
-262
auth.test.php
tests/cases/laravel/auth.test.php
+0
-69
autoloader.test.php
tests/cases/laravel/autoloader.test.php
+0
-102
config.test.php
tests/cases/laravel/config.test.php
+0
-65
event.test.php
tests/cases/laravel/event.test.php
+0
-50
route.test.php
tests/cases/laravel/route.test.php
+0
-51
routing.test.php
tests/cases/laravel/routing.test.php
+0
-110
str.test.php
tests/cases/laravel/str.test.php
+0
-133
view.test.php
tests/cases/laravel/view.test.php
+0
-237
bundle.php
tests/laravel/application/bundle.php
+0
-42
application.php
tests/laravel/application/config/application.php
+0
-171
auth.php
tests/laravel/application/config/auth.php
+0
-68
cache.php
tests/laravel/application/config/cache.php
+0
-71
database.php
tests/laravel/application/config/database.php
+0
-90
error.php
tests/laravel/application/config/error.php
+0
-69
database.php
tests/laravel/application/config/local/database.php
+0
-7
mimes.php
tests/laravel/application/config/mimes.php
+0
-97
session.php
tests/laravel/application/config/session.php
+0
-117
strings.php
tests/laravel/application/config/strings.php
+0
-119
panel.php
tests/laravel/application/controllers/admin/panel.php
+0
-7
auth.php
tests/laravel/application/controllers/auth.php
+0
-7
home.php
tests/laravel/application/controllers/home.php
+0
-42
repository.php
tests/laravel/application/dashboard/repository.php
+0
-7
pagination.php
tests/laravel/application/language/en/pagination.php
+0
-19
validation.php
tests/laravel/application/language/en/validation.php
+0
-75
.gitignore
tests/laravel/application/libraries/.gitignore
+0
-0
.gitignore
tests/laravel/application/migrations/.gitignore
+0
-0
.gitignore
tests/laravel/application/models/.gitignore
+0
-0
autoloader.php
tests/laravel/application/models/autoloader.php
+0
-3
user.php
tests/laravel/application/models/repositories/user.php
+0
-3
user.php
tests/laravel/application/models/user.php
+0
-3
routes.php
tests/laravel/application/routes.php
+0
-87
.gitignore
tests/laravel/application/tasks/.gitignore
+0
-0
404.php
tests/laravel/application/views/error/404.php
+0
-103
500.php
tests/laravel/application/views/error/500.php
+0
-103
index.php
tests/laravel/application/views/home/index.php
+0
-122
basic.php
tests/laravel/application/views/tests/basic.php
+0
-1
nested.php
tests/laravel/application/views/tests/nested.php
+0
-1
.gitignore
tests/laravel/bundles/.gitignore
+0
-0
bundles.php
tests/laravel/bundles/bundles.php
+0
-43
meta.php
tests/laravel/bundles/dashboard/config/meta.php
+0
-7
panel.php
tests/laravel/bundles/dashboard/controllers/panel.php
+0
-6
repository.php
tests/laravel/bundles/dashboard/models/repository.php
+0
-7
routes.php
tests/laravel/bundles/dashboard/routes.php
+0
-3
.gitignore
tests/laravel/storage/cache/.gitignore
+0
-0
.gitignore
tests/laravel/storage/database/.gitignore
+0
-1
.gitignore
tests/laravel/storage/logs/.gitignore
+0
-0
.gitignore
tests/laravel/storage/sessions/.gitignore
+0
-0
.gitignore
tests/laravel/storage/views/.gitignore
+0
-0
No files found.
build.xml
0 → 100644
View file @
f420ec55
<phpunit
colors=
"true"
bootstrap=
"phpunit.php"
backupGlobals=
"false"
>
<testsuites>
<testsuite
name=
"Test Suite"
>
<directory
suffix=
".test.php"
>
bundles/laravel-tests/cases
</directory>
</testsuite>
</testsuites>
</phpunit>
\ No newline at end of file
phpunit.php
View file @
f420ec55
...
...
@@ -16,16 +16,13 @@ define('DS', DIRECTORY_SEPARATOR);
// --------------------------------------------------------------
// Override the framework paths if testing Laravel.
// --------------------------------------------------------------
foreach
(
$_SERVER
[
'argv'
]
as
$key
=>
$argument
)
if
(
in_array
(
'build.xml'
,
$_SERVER
[
'argv'
])
)
{
if
(
$argument
==
'laravel'
and
$_SERVER
[
'argv'
][
$key
-
1
]
==
'--group'
)
{
define
(
'APP_PATH'
,
realpath
(
'tests/laravel/application'
)
.
DS
);
define
(
'APP_PATH'
,
realpath
(
'bundles/laravel-tests/application'
)
.
DS
);
define
(
'BUNDLE_PATH'
,
realpath
(
'tests/laravel
/bundles'
)
.
DS
);
define
(
'BUNDLE_PATH'
,
realpath
(
'bundles/laravel-tests
/bundles'
)
.
DS
);
define
(
'STORAGE_PATH'
,
realpath
(
'tests/laravel/storage'
)
.
DS
);
}
define
(
'STORAGE_PATH'
,
realpath
(
'bundles/laravel-tests/storage'
)
.
DS
);
}
// --------------------------------------------------------------
...
...
phpunit.xml
View file @
f420ec55
...
...
@@ -3,7 +3,7 @@
backupGlobals=
"false"
>
<testsuites>
<testsuite
name=
"Test Suite"
>
<directory
suffix=
".test.php"
>
tests
/cases
</directory>
<directory
suffix=
".test.php"
>
tests
</directory>
</testsuite>
</testsuites>
</phpunit>
\ No newline at end of file
tests/
cases/
application/.gitignore
→
tests/application/.gitignore
View file @
f420ec55
File moved
tests/
cases/
bundles/.gitignore
→
tests/bundles/.gitignore
View file @
f420ec55
File moved
tests/cases/laravel/asset.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
AssetTest
extends
PHPUnit_Framework_TestCase
{
/**
* Initialize the test environment.
*/
public
function
setUp
()
{
Config
::
$items
=
array
();
Config
::
$cache
=
array
();
Asset
::
$containers
=
array
();
}
/**
* Test the Asset::container method.
*
* @group laravel
*/
public
function
testContainersCanBeCreated
()
{
$container
=
Asset
::
container
(
'foo'
);
$this
->
assertTrue
(
$container
===
Asset
::
container
(
'foo'
));
$this
->
assertInstanceOf
(
'\\Laravel\\Asset_Container'
,
$container
);
}
/**
* Test the Asset::container method for default container creation.
*
* @group laravel
*/
public
function
testDefaultContainerCreatedByDefault
()
{
$this
->
assertEquals
(
'default'
,
Asset
::
container
()
->
name
);
}
/**
* Test the Asset::__callStatic method.
*
* @group laravel
*/
public
function
testContainerMethodsCanBeDynamicallyCalled
()
{
Asset
::
style
(
'common'
,
'common.css'
);
$this
->
assertEquals
(
'common.css'
,
Asset
::
container
()
->
assets
[
'style'
][
'common'
][
'source'
]);
}
/**
* Test the Asset_Container constructor.
*
* @group laravel
*/
public
function
testNameIsSetOnAssetContainerConstruction
()
{
$container
=
$this
->
getContainer
();
$this
->
assertEquals
(
'foo'
,
$container
->
name
);
}
/**
* Test the Asset_Container::add method.
*
* @group laravel
*/
public
function
testAddMethodProperlySniffsAssetType
()
{
$container
=
$this
->
getContainer
();
$container
->
add
(
'jquery'
,
'jquery.js'
);
$container
->
add
(
'common'
,
'common.css'
);
$this
->
assertEquals
(
'jquery.js'
,
$container
->
assets
[
'script'
][
'jquery'
][
'source'
]);
$this
->
assertEquals
(
'common.css'
,
$container
->
assets
[
'style'
][
'common'
][
'source'
]);
}
/**
* Test the Asset_Container::style method.
*
* @group laravel
*/
public
function
testStyleMethodProperlyRegistersAnAsset
()
{
$container
=
$this
->
getContainer
();
$container
->
style
(
'common'
,
'common.css'
);
$this
->
assertEquals
(
'common.css'
,
$container
->
assets
[
'style'
][
'common'
][
'source'
]);
}
/**
* Test the Asset_Container::style method sets media attribute.
*
* @group laravel
*/
public
function
testStyleMethodProperlySetsMediaAttributeIfNotSet
()
{
$container
=
$this
->
getContainer
();
$container
->
style
(
'common'
,
'common.css'
);
$this
->
assertEquals
(
'all'
,
$container
->
assets
[
'style'
][
'common'
][
'attributes'
][
'media'
]);
}
/**
* Test the Asset_Container::style method sets media attribute.
*
* @group laravel
*/
public
function
testStyleMethodProperlyIgnoresMediaAttributeIfSet
()
{
$container
=
$this
->
getContainer
();
$container
->
style
(
'common'
,
'common.css'
,
array
(),
array
(
'media'
=>
'print'
));
$this
->
assertEquals
(
'print'
,
$container
->
assets
[
'style'
][
'common'
][
'attributes'
][
'media'
]);
}
/**
* Test the Asset_Container::script method.
*
* @group laravel
*/
public
function
testScriptMethodProperlyRegistersAnAsset
()
{
$container
=
$this
->
getContainer
();
$container
->
script
(
'jquery'
,
'jquery.js'
);
$this
->
assertEquals
(
'jquery.js'
,
$container
->
assets
[
'script'
][
'jquery'
][
'source'
]);
}
/**
* Test the Asset_Container::add method properly sets dependencies.
*
* @group laravel
*/
public
function
testAddMethodProperlySetsDependencies
()
{
$container
=
$this
->
getContainer
();
$container
->
add
(
'common'
,
'common.css'
,
'jquery'
);
$container
->
add
(
'jquery'
,
'jquery.js'
,
array
(
'jquery-ui'
));
$this
->
assertEquals
(
array
(
'jquery'
),
$container
->
assets
[
'style'
][
'common'
][
'dependencies'
]);
$this
->
assertEquals
(
array
(
'jquery-ui'
),
$container
->
assets
[
'script'
][
'jquery'
][
'dependencies'
]);
}
/**
* Test the Asset_Container::add method properly sets attributes.
*
* @group laravel
*/
public
function
testAddMethodProperlySetsAttributes
()
{
$container
=
$this
->
getContainer
();
$container
->
add
(
'common'
,
'common.css'
,
array
(),
array
(
'media'
=>
'print'
));
$container
->
add
(
'jquery'
,
'jquery.js'
,
array
(),
array
(
'defer'
));
$this
->
assertEquals
(
array
(
'media'
=>
'print'
),
$container
->
assets
[
'style'
][
'common'
][
'attributes'
]);
$this
->
assertEquals
(
array
(
'defer'
),
$container
->
assets
[
'script'
][
'jquery'
][
'attributes'
]);
}
/**
* Test the Asset_Container::bundle method.
*
* @group laravel
*/
public
function
testBundleMethodCorrectlySetsTheAssetBundle
()
{
$container
=
$this
->
getContainer
();
$container
->
bundle
(
'eloquent'
);
$this
->
assertEquals
(
'eloquent'
,
$container
->
bundle
);
}
/**
* Test the Asset_Container::path method.
*
* @group laravel
*/
public
function
testPathMethodReturnsCorrectPathForABundleAsset
()
{
Config
::
$cache
[
'application.url'
]
=
'http://localhost'
;
$container
=
$this
->
getContainer
();
$container
->
bundle
(
'eloquent'
);
$this
->
assertEquals
(
'http://localhost/bundles/eloquent/foo.jpg'
,
$container
->
path
(
'foo.jpg'
));
}
/**
* Test the Asset_Container::path method.
*
* @group laravel
*/
public
function
testPathMethodReturnsCorrectPathForAnApplicationAsset
()
{
Config
::
$cache
[
'application.url'
]
=
'http://localhost'
;
$container
=
$this
->
getContainer
();
$this
->
assertEquals
(
'http://localhost/foo.jpg'
,
$container
->
path
(
'foo.jpg'
));
}
/**
* Test the Asset_Container::scripts method.
*
* @group laravel
*/
public
function
testScriptsCanBeRetrieved
()
{
$container
=
$this
->
getContainer
();
$container
->
script
(
'dojo'
,
'dojo.js'
,
array
(
'jquery-ui'
));
$container
->
script
(
'jquery'
,
'jquery.js'
,
array
(
'jquery-ui'
,
'dojo'
));
$container
->
script
(
'jquery-ui'
,
'jquery-ui.js'
);
$scripts
=
$container
->
scripts
();
$this
->
assertTrue
(
strpos
(
$scripts
,
'jquery.js'
)
>
0
);
$this
->
assertTrue
(
strpos
(
$scripts
,
'jquery.js'
)
>
strpos
(
$scripts
,
'jquery-ui.js'
));
$this
->
assertTrue
(
strpos
(
$scripts
,
'dojo.js'
)
>
strpos
(
$scripts
,
'jquery-ui.js'
));
}
/**
* Test the Asset_Container::styles method.
*
* @group laravel
*/
public
function
testStylesCanBeRetrieved
()
{
$container
=
$this
->
getContainer
();
$container
->
style
(
'dojo'
,
'dojo.css'
,
array
(
'jquery-ui'
),
array
(
'media'
=>
'print'
));
$container
->
style
(
'jquery'
,
'jquery.css'
,
array
(
'jquery-ui'
,
'dojo'
));
$container
->
style
(
'jquery-ui'
,
'jquery-ui.css'
);
$styles
=
$container
->
styles
();
$this
->
assertTrue
(
strpos
(
$styles
,
'jquery.css'
)
>
0
);
$this
->
assertTrue
(
strpos
(
$styles
,
'media="print"'
)
>
0
);
$this
->
assertTrue
(
strpos
(
$styles
,
'jquery.css'
)
>
strpos
(
$styles
,
'jquery-ui.css'
));
$this
->
assertTrue
(
strpos
(
$styles
,
'dojo.css'
)
>
strpos
(
$styles
,
'jquery-ui.css'
));
}
/**
* Get an asset container instance.
*
* @param string $name
* @return Asset_Container
*/
private
function
getContainer
(
$name
=
'foo'
)
{
return
new
Laravel\Asset_Container
(
$name
);
}
}
\ No newline at end of file
tests/cases/laravel/auth.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
AuthTest
extends
PHPUnit_Framework_TestCase
{
/**
* Test the Auth::user method.
*
* @group laravel
*/
public
function
testUserMethodReturnsCurrentUser
()
{
Auth
::
$user
=
'Taylor'
;
$this
->
assertEquals
(
'Taylor'
,
Auth
::
user
());
}
/**
* Test the Auth::check method.
*
* @group laravel
*/
public
function
testCheckMethodReturnsTrueWhenUserIsSet
()
{
$this
->
assertTrue
(
AuthUserReturnsDummy
::
check
());
}
/**
* Test the Auth::check method.
*
* @group laravel
*/
public
function
testCheckMethodReturnsFalseWhenNoUserIsSet
()
{
$this
->
assertFalse
(
AuthUserReturnsNull
::
check
());
}
/**
* Test the Auth::guest method.
*
* @group laravel
*/
public
function
testGuestReturnsTrueWhenNoUserIsSet
()
{
$this
->
assertTrue
(
AuthUserReturnsNull
::
guest
());
}
/**
* Test the Auth::guest method.
*
* @group laravel
*/
public
function
testGuestReturnsFalseWhenUserIsSet
()
{
$this
->
assertFalse
(
AuthUserReturnsDummy
::
guest
());
}
}
class
AuthUserReturnsNull
extends
Laravel\Auth
{
public
static
function
user
()
{}
}
class
AuthUserReturnsDummy
extends
Laravel\Auth
{
public
static
function
user
()
{
return
'Taylor'
;
}
}
\ No newline at end of file
tests/cases/laravel/autoloader.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
AutoloaderTest
extends
PHPUnit_Framework_TestCase
{
/**
* Test the Autoloader::map method.
*
* @group laravel
*/
public
function
testMapsCanBeRegistered
()
{
Autoloader
::
map
(
array
(
'Foo'
=>
APP_PATH
.
'models/foo.php'
,
));
$this
->
assertEquals
(
APP_PATH
.
'models/foo.php'
,
Autoloader
::
$mappings
[
'Foo'
]);
}
/**
* Test the Autoloader::alias method.
*
* @group laravel
*/
public
function
testAliasesCanBeRegistered
()
{
Autoloader
::
alias
(
'Foo\\Bar'
,
'Foo'
);
$this
->
assertEquals
(
'Foo\\Bar'
,
Autoloader
::
$aliases
[
'Foo'
]);
}
/**
* Test the Autoloader::psr method.
*
* @group laravel
*/
public
function
testPsrDirectoriesCanBeRegistered
()
{
Autoloader
::
psr
(
array
(
APP_PATH
.
'foo'
.
DS
.
'bar'
,
APP_PATH
.
'foo'
.
DS
.
'baz'
.
DS
.
DS
,
));
$this
->
assertTrue
(
in_array
(
APP_PATH
.
'foo'
.
DS
.
'bar'
.
DS
,
Autoloader
::
$psr
));
$this
->
assertTrue
(
in_array
(
APP_PATH
.
'foo'
.
DS
.
'baz'
.
DS
,
Autoloader
::
$psr
));
}
/**
* Test the Autoloader::namespaces method.
*
* @group laravel
*/
public
function
testNamespacesCanBeRegistered
()
{
Autoloader
::
namespaces
(
array
(
'Autoloader_1'
=>
BUNDLE_PATH
.
'autoload'
.
DS
.
'models'
,
'Autoloader_2'
=>
BUNDLE_PATH
.
'autoload'
.
DS
.
'libraries'
.
DS
.
DS
,
));
$this
->
assertEquals
(
BUNDLE_PATH
.
'autoload'
.
DS
.
'models'
.
DS
,
Autoloader
::
$namespaces
[
'Autoloader_1'
]);
$this
->
assertEquals
(
BUNDLE_PATH
.
'autoload'
.
DS
.
'libraries'
.
DS
,
Autoloader
::
$namespaces
[
'Autoloader_2'
]);
}
/**
* Test the loading of PSR-0 models and libraries.
*
* @group laravel
*/
public
function
testPsrLibrariesAndModelsCanBeLoaded
()
{
$this
->
assertInstanceOf
(
'User'
,
new
User
);
$this
->
assertInstanceOf
(
'Repositories\\User'
,
new
Repositories\User
);
}
/**
* Test the loading of hard-coded classes.
*
* @group laravel
*/
public
function
testHardcodedClassesCanBeLoaded
()
{
Autoloader
::
map
(
array
(
'Autoloader_HardCoded'
=>
APP_PATH
.
'models'
.
DS
.
'autoloader.php'
,
));
$this
->
assertInstanceOf
(
'Autoloader_HardCoded'
,
new
Autoloader_HardCoded
);
}
/**
* Test the loading of classes mapped by namespaces.
*
* @group laravel
*/
public
function
testClassesMappedByNamespaceCanBeLoaded
()
{
Autoloader
::
namespaces
(
array
(
'Dashboard'
=>
BUNDLE_PATH
.
'dashboard'
.
DS
.
'models'
,
));
$this
->
assertInstanceOf
(
'Dashboard\\Repository'
,
new
Dashboard\Repository
);
}
}
\ No newline at end of file
tests/cases/laravel/config.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
ConfigTest
extends
PHPUnit_Framework_TestCase
{
/**
* Tear down the testing environment.
*/
public
function
tearDown
()
{
Config
::
$items
=
array
();
Config
::
$cache
=
array
();
}
/**
* Test the Config::get method.
*
* @group laravel
*/
public
function
testItemsCanBeRetrievedFromConfigFiles
()
{
$this
->
assertEquals
(
'UTF-8'
,
Config
::
get
(
'application.encoding'
));
$this
->
assertEquals
(
'mysql'
,
Config
::
get
(
'database.connections.mysql.driver'
));
$this
->
assertEquals
(
'dashboard'
,
Config
::
get
(
'dashboard::meta.bundle'
));
}
/**
* Test the Config::has method.
*
* @group laravel
*/
public
function
testHasMethodIndicatesIfConfigItemExists
()
{
$this
->
assertFalse
(
Config
::
has
(
'application.foo'
));
$this
->
assertTrue
(
Config
::
has
(
'application.encoding'
));
}
/**
* Test the Config::set method.
*
* @group laravel
*/
public
function
testConfigItemsCanBeSet
()
{
Config
::
set
(
'application.encoding'
,
'foo'
);
Config
::
set
(
'dashboard::meta.bundle'
,
'bar'
);
$this
->
assertEquals
(
'foo'
,
Config
::
get
(
'application.encoding'
));
$this
->
assertEquals
(
'bar'
,
Config
::
get
(
'dashboard::meta.bundle'
));
}
/**
* Test that environment configurations are loaded correctly.
*
* @group laravel
*/
public
function
testEnvironmentConfigsOverrideNormalConfigurations
()
{
$_SERVER
[
'LARAVEL_ENV'
]
=
'local'
;
$this
->
assertEquals
(
'sqlite'
,
Config
::
get
(
'database.default'
));
unset
(
$_SERVER
[
'LARAVEL_ENV'
]);
}
}
\ No newline at end of file
tests/cases/laravel/event.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
EventTest
extends
PHPUnit_Framework_TestCase
{
/**
* Tear down the testing environment.
*/
public
function
tearDown
()
{
Event
::
$events
=
array
();
}
/**
* Test basic event firing.
*
* @group laravel
*/
public
function
testListenersAreFiredForEvents
()
{
Event
::
listen
(
'test.event'
,
function
()
{
return
1
;
});
Event
::
listen
(
'test.event'
,
function
()
{
return
2
;
});
$responses
=
Event
::
fire
(
'test.event'
);
$this
->
assertEquals
(
1
,
$responses
[
0
]);
$this
->
assertEquals
(
2
,
$responses
[
1
]);
}
/**
* Test parameters can be passed to event listeners.
*
* @group laravel
*/
public
function
testParametersCanBePassedToEvents
()
{
Event
::
listen
(
'test.event'
,
function
(
$var
)
{
return
$var
;
});
$responses
=
Event
::
fire
(
'test.event'
,
array
(
'Taylor'
));
$this
->
assertEquals
(
'Taylor'
,
$responses
[
0
]);
}
}
\ No newline at end of file
tests/cases/laravel/route.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
use
Laravel\Routing\Route
;
class
RouteTest
extends
PHPUnit_Framework_TestCase
{
/**
* Destroy the testing environment.
*/
public
function
tearDown
()
{
Request
::
$route
=
null
;
}
/**
* Tests the Route::handles method.
*
* @group laravel
*/
public
function
testHandlesIndicatesIfTheRouteHandlesAGivenURI
()
{
$route
=
new
Route
(
'GET /'
,
array
(
'handles'
=>
array
(
'GET /foo/bar'
)));
$this
->
assertTrue
(
$route
->
handles
(
'foo/*'
));
$this
->
assertTrue
(
$route
->
handles
(
'foo/bar'
));
$this
->
assertFalse
(
$route
->
handles
(
'/'
));
$this
->
assertFalse
(
$route
->
handles
(
'baz'
));
$this
->
assertFalse
(
$route
->
handles
(
'/foo'
));
$this
->
assertFalse
(
$route
->
handles
(
'foo'
));
$route
=
new
Route
(
'GET /'
,
array
(
'handles'
=>
array
(
'GET /'
,
'GET /home'
)));
$this
->
assertTrue
(
$route
->
handles
(
'/'
));
$this
->
assertTrue
(
$route
->
handles
(
'home'
));
$this
->
assertFalse
(
$route
->
handles
(
'foo'
));
}
/**
* Tests the Route::is method.
*
* @group laravel
*/
public
function
testIsMethodIndicatesIfTheRouteHasAGivenName
()
{
$route
=
new
Route
(
'GET /'
,
array
(
'name'
=>
'profile'
));
$this
->
assertTrue
(
$route
->
is
(
'profile'
));
$this
->
assertFalse
(
$route
->
is
(
'something'
));
}
}
\ No newline at end of file
tests/cases/laravel/routing.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
use
Laravel\Routing\Router
;
class
RoutingTest
extends
PHPUnit_Framework_TestCase
{
/**
* Destroy the testing environment.
*/
public
function
tearDown
()
{
Router
::
$names
=
array
();
Router
::
$routes
=
array
();
}
/**
* Test the basic routing mechanism.
*
* @group laravel
*/
public
function
testBasicRouteCanBeRouted
()
{
Router
::
register
(
'GET /'
,
function
()
{});
Router
::
register
(
array
(
'GET /home'
,
'GET /main'
),
function
()
{});
$this
->
assertEquals
(
'GET /'
,
Router
::
route
(
'GET'
,
'/'
)
->
key
);
$this
->
assertEquals
(
'GET /home'
,
Router
::
route
(
'GET'
,
'/home'
)
->
key
);
$this
->
assertEquals
(
'GET /main'
,
Router
::
route
(
'GET'
,
'/main'
)
->
key
);
}
/**
* Test that the router can handle basic wildcards.
*
* @group laravel
*/
public
function
testWildcardRoutesCanBeRouted
()
{
Router
::
register
(
'GET /user/(:num)'
,
function
()
{});
Router
::
register
(
'GET /profile/(:any)/(:num)'
,
function
()
{});
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'user/1.5'
));
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'user/taylor'
));
$this
->
assertEquals
(
'GET /user/(:num)'
,
Router
::
route
(
'GET'
,
'user/1'
)
->
key
);
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'profile/1/otwell'
));
$this
->
assertNull
(
Router
::
route
(
'POST'
,
'profile/taylor/1'
));
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'profile/taylor/otwell'
));
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'profile/taylor/1/otwell'
));
$this
->
assertEquals
(
'GET /profile/(:any)/(:num)'
,
Router
::
route
(
'GET'
,
'profile/taylor/1'
)
->
key
);
}
/**
* Test that optional wildcards can be routed.
*
* @group laravel
*/
public
function
testOptionalWildcardsCanBeRouted
()
{
Router
::
register
(
'GET /user/(:num?)'
,
function
()
{});
Router
::
register
(
'GET /profile/(:any)/(:any?)'
,
function
()
{});
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'user/taylor'
));
$this
->
assertEquals
(
'GET /user/(:num?)'
,
Router
::
route
(
'GET'
,
'user'
)
->
key
);
$this
->
assertEquals
(
'GET /user/(:num?)'
,
Router
::
route
(
'GET'
,
'user/1'
)
->
key
);
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'profile/taylor/otwell/test'
));
$this
->
assertEquals
(
'GET /profile/(:any)/(:any?)'
,
Router
::
route
(
'GET'
,
'profile/taylor'
)
->
key
);
$this
->
assertEquals
(
'GET /profile/(:any)/(:any?)'
,
Router
::
route
(
'GET'
,
'profile/taylor/25'
)
->
key
);
$this
->
assertEquals
(
'GET /profile/(:any)/(:any?)'
,
Router
::
route
(
'GET'
,
'profile/taylor/otwell'
)
->
key
);
}
/**
* Test that basic controller routing is working.
*
* @group laravel
*/
public
function
testBasicRouteToControllerIsRouted
()
{
$this
->
assertEquals
(
'home@index'
,
Router
::
route
(
'GET'
,
'/'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'auth@index'
,
Router
::
route
(
'GET'
,
'auth'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'home@index'
,
Router
::
route
(
'GET'
,
'home'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'home@index'
,
Router
::
route
(
'GET'
,
'home/index'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'home@profile'
,
Router
::
route
(
'GET'
,
'home/profile'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'admin.panel@index'
,
Router
::
route
(
'GET'
,
'admin/panel'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'admin.panel@show'
,
Router
::
route
(
'GET'
,
'admin/panel/show'
)
->
action
[
'uses'
]);
}
/**
* Test basic bundle route resolution.
*
* @group laravel
*/
public
function
testRoutesToBundlesCanBeResolved
()
{
$this
->
assertNull
(
Router
::
route
(
'GET'
,
'dashboard/foo'
));
$this
->
assertEquals
(
'GET /dashboard'
,
Router
::
route
(
'GET'
,
'dashboard'
)
->
key
);
}
/**
* Test bundle controller route resolution.
*
* @group laravel
*/
public
function
testBundleControllersCanBeResolved
()
{
$this
->
assertEquals
(
'dashboard::panel@index'
,
Router
::
route
(
'GET'
,
'dashboard/panel'
)
->
action
[
'uses'
]);
$this
->
assertEquals
(
'dashboard::panel@show'
,
Router
::
route
(
'GET'
,
'dashboard/panel/show'
)
->
action
[
'uses'
]);
}
}
\ No newline at end of file
tests/cases/laravel/str.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
StrTest
extends
PHPUnit_Framework_TestCase
{
/**
* Test the Str::encoding method.
*
* @group laravel
*/
public
function
testEncodingShouldReturnApplicationEncoding
()
{
$this
->
assertEquals
(
'UTF-8'
,
Config
::
get
(
'application.encoding'
));
Config
::
set
(
'application.encoding'
,
'foo'
);
$this
->
assertEquals
(
'foo'
,
Config
::
get
(
'application.encoding'
));
Config
::
set
(
'application.encoding'
,
'UTF-8'
);
}
/**
* Test the Str::length method.
*
* @group laravel
*/
public
function
testStringLengthIsCorrect
()
{
$this
->
assertEquals
(
6
,
Str
::
length
(
'Taylor'
));
$this
->
assertEquals
(
5
,
Str
::
length
(
'ラドクリフ'
));
}
/**
* Test the Str::lower method.
*
* @group laravel
*/
public
function
testStringCanBeConvertedToLowercase
()
{
$this
->
assertEquals
(
'taylor'
,
Str
::
lower
(
'TAYLOR'
));
$this
->
assertEquals
(
'άχιστη'
,
Str
::
lower
(
'ΆΧΙΣΤΗ'
));
}
/**
* Test the Str::upper method.
*
* @group laravel
*/
public
function
testStringCanBeConvertedToUppercase
()
{
$this
->
assertEquals
(
'TAYLOR'
,
Str
::
upper
(
'taylor'
));
$this
->
assertEquals
(
'ΆΧΙΣΤΗ'
,
Str
::
upper
(
'άχιστη'
));
}
/**
* Test the Str::title method.
*
* @group laravel
*/
public
function
testStringCanBeConvertedToTitleCase
()
{
$this
->
assertEquals
(
'Taylor'
,
Str
::
title
(
'taylor'
));
$this
->
assertEquals
(
'Άχιστη'
,
Str
::
title
(
'άχιστη'
));
}
/**
* Test the Str::limit method.
*
* @group laravel
*/
public
function
testStringCanBeLimitedByCharacters
()
{
$this
->
assertEquals
(
'Tay...'
,
Str
::
limit
(
'Taylor'
,
3
));
$this
->
assertEquals
(
'Taylor'
,
Str
::
limit
(
'Taylor'
,
6
));
$this
->
assertEquals
(
'Tay___'
,
Str
::
limit
(
'Taylor'
,
3
,
'___'
));
}
/**
* Test the Str::words method.
*
* @group laravel
*/
public
function
testStringCanBeLimitedByWords
()
{
$this
->
assertEquals
(
'Taylor...'
,
Str
::
words
(
'Taylor Otwell'
,
1
));
$this
->
assertEquals
(
'Taylor___'
,
Str
::
words
(
'Taylor Otwell'
,
1
,
'___'
));
$this
->
assertEquals
(
'Taylor Otwell'
,
Str
::
words
(
'Taylor Otwell'
,
3
));
}
/**
* Test the Str::plural and Str::singular methods.
*
* @group laravel
*/
public
function
testStringsCanBeSingularOrPlural
()
{
$this
->
assertEquals
(
'user'
,
Str
::
singular
(
'users'
));
$this
->
assertEquals
(
'user'
,
Str
::
singular
(
'USERS'
));
$this
->
assertEquals
(
'users'
,
Str
::
plural
(
'user'
));
$this
->
assertEquals
(
'users'
,
Str
::
plural
(
'USER'
));
$this
->
assertEquals
(
'user'
,
Str
::
plural
(
'user'
,
1
));
$this
->
assertEquals
(
'users'
,
Str
::
plural
(
'user'
,
2
));
}
/**
* Test the Str::slug method.
*
* @group laravel
*/
public
function
testStringsCanBeSlugged
()
{
$this
->
assertEquals
(
'my-new-post'
,
Str
::
slug
(
'My nEw post!!!'
));
$this
->
assertEquals
(
'my_new_post'
,
Str
::
slug
(
'My nEw post!!!'
,
'_'
));
}
/**
* Test the Str::classify method.
*
* @group laravel
*/
public
function
testStringsCanBeClassified
()
{
$this
->
assertEquals
(
'Something_Else'
,
Str
::
classify
(
'something.else'
));
$this
->
assertEquals
(
'Something_Else'
,
Str
::
classify
(
'something_else'
));
}
/**
* Test the Str::random method.
*
* @group laravel
*/
public
function
testRandomStringsCanBeGenerated
()
{
$this
->
assertEquals
(
40
,
strlen
(
Str
::
random
(
40
)));
}
}
\ No newline at end of file
tests/cases/laravel/view.test.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
ViewTest
extends
PHPUnit_Framework_TestCase
{
/**
* Tear down the testing environment.
*/
public
function
tearDown
()
{
View
::
$shared
=
array
();
Event
::
$events
=
array
();
}
/**
* Test the View::make method.
*
* @group laravel
*/
public
function
testMakeMethodReturnsAViewInstance
()
{
$this
->
assertInstanceOf
(
'Laravel\\View'
,
View
::
make
(
'home.index'
));
}
/**
* Test the View class constructor.
*
* @group laravel
*/
public
function
testViewNameIsSetByConstrutor
()
{
$view
=
new
View
(
'home.index'
);
$this
->
assertEquals
(
'home.index'
,
$view
->
view
);
}
/**
* Test the View class constructor.
*
* @group laravel
*/
public
function
testViewIsCreatedWithCorrectPath
()
{
$view
=
new
View
(
'home.index'
);
$this
->
assertEquals
(
APP_PATH
.
'views/home/index.php'
,
$view
->
path
);
}
/**
* Test the View class constructor.
*
* @group laravel
*/
public
function
testDataIsSetOnViewByConstructor
()
{
$view
=
new
View
(
'home.index'
,
array
(
'name'
=>
'Taylor'
));
$this
->
assertEquals
(
'Taylor'
,
$view
->
data
[
'name'
]);
}
/**
* Test the View::name method.
*
* @group laravel
*/
public
function
testNameMethodRegistersAViewName
()
{
View
::
name
(
'home.index'
,
'home'
);
$this
->
assertEquals
(
'home.index'
,
View
::
$names
[
'home'
]);
}
/**
* Test the View::shared method.
*
* @group laravel
*/
public
function
testSharedMethodAddsDataToSharedArray
()
{
View
::
share
(
'comment'
,
'Taylor'
);
$this
->
assertEquals
(
'Taylor'
,
View
::
$shared
[
'comment'
]);
}
/**
* Test the View::with method.
*
* @group laravel
*/
public
function
testViewDataCanBeSetUsingWithMethod
()
{
$view
=
View
::
make
(
'home.index'
)
->
with
(
'comment'
,
'Taylor'
);
$this
->
assertEquals
(
'Taylor'
,
$view
->
data
[
'comment'
]);
}
/**
* Test the View class constructor.
*
* @group laravel
*/
public
function
testEmptyMessageContainerSetOnViewWhenNoErrorsInSession
()
{
$view
=
new
View
(
'home.index'
);
$this
->
assertInstanceOf
(
'Laravel\\Messages'
,
$view
->
data
[
'errors'
]);
}
/**
* Test the View __set method.
*
* @group laravel
*/
public
function
testDataCanBeSetOnViewsThroughMagicMethods
()
{
$view
=
new
View
(
'home.index'
);
$view
->
comment
=
'Taylor'
;
$this
->
assertEquals
(
'Taylor'
,
$view
->
data
[
'comment'
]);
}
/**
* Test the View __get method.
*
* @group laravel
*/
public
function
testDataCanBeRetrievedFromViewsThroughMagicMethods
()
{
$view
=
new
View
(
'home.index'
);
$view
->
comment
=
'Taylor'
;
$this
->
assertEquals
(
'Taylor'
,
$view
->
comment
);
}
/**
* Test the View's ArrayAccess implementation.
*
* @group laravel
*/
public
function
testDataCanBeSetOnTheViewThroughArrayAccess
()
{
$view
=
new
View
(
'home.index'
);
$view
[
'comment'
]
=
'Taylor'
;
$this
->
assertEquals
(
'Taylor'
,
$view
->
data
[
'comment'
]);
}
/**
* Test the View's ArrayAccess implementation.
*
* @group laravel
*/
public
function
testDataCanBeRetrievedThroughArrayAccess
()
{
$view
=
new
View
(
'home.index'
);
$view
[
'comment'
]
=
'Taylor'
;
$this
->
assertEquals
(
'Taylor'
,
$view
[
'comment'
]);
}
/**
* Test the View::nest method.
*
* @group laravel
*/
public
function
testNestMethodSetsViewInstanceInData
()
{
$view
=
View
::
make
(
'home.index'
)
->
nest
(
'partial'
,
'tests.basic'
);
$this
->
assertEquals
(
'tests.basic'
,
$view
->
data
[
'partial'
]
->
view
);
$this
->
assertInstanceOf
(
'Laravel\\View'
,
$view
->
data
[
'partial'
]);
}
/**
* Test that the registered data is passed to the view correctly.
*
* @group laravel
*/
public
function
testDataIsPassedToViewCorrectly
()
{
View
::
share
(
'name'
,
'Taylor'
);
$view
=
View
::
make
(
'tests.basic'
)
->
with
(
'age'
,
25
)
->
render
();
$this
->
assertEquals
(
'Taylor is 25'
,
$view
);
}
/**
* Test that the View class renders nested views.
*
* @group laravel
*/
public
function
testNestedViewsAreRendered
()
{
$view
=
View
::
make
(
'tests.basic'
)
->
with
(
'age'
,
25
)
->
nest
(
'name'
,
'tests.nested'
);
$this
->
assertEquals
(
'Taylor is 25'
,
$view
->
render
());
}
/**
* Test that the View class renders nested responses.
*
* @group laravel
*/
public
function
testNestedResponsesAreRendered
()
{
$view
=
View
::
make
(
'tests.basic'
)
->
with
(
'age'
,
25
)
->
with
(
'name'
,
Response
::
view
(
'tests.nested'
));
$this
->
assertEquals
(
'Taylor is 25'
,
$view
->
render
());
}
/**
* Test the View class raises a composer event.
*
* @group laravel
*/
public
function
testComposerEventIsCalledWhenViewIsRendering
()
{
View
::
composer
(
'tests.basic'
,
function
(
$view
)
{
$view
->
data
=
array
(
'name'
=>
'Taylor'
,
'age'
=>
25
);
});
$view
=
View
::
make
(
'tests.basic'
)
->
render
();
$this
->
assertEquals
(
'Taylor is 25'
,
$view
);
}
}
\ No newline at end of file
tests/laravel/application/bundle.php
deleted
100644 → 0
View file @
8325f6dc
<?php
/*
|--------------------------------------------------------------------------
| Auto-Loader PSR-0 Directories
|--------------------------------------------------------------------------
|
| The Laravel auto-loader can search directories for files using the PSR-0
| naming convention. This convention basically organizes classes by using
| the class namespace to indicate the directory structure.
|
| So you don't have to manually map all of your models, we've added the
| models and libraries directories for you. So, you can model away and
| the auto-loader will take care of the rest.
|
*/
Autoloader
::
psr
(
array
(
APP_PATH
.
'models'
,
APP_PATH
.
'libraries'
,
));
/*
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Laravel uses a simple array of class to path mappings to drive the class
| auto-loader. This simple approach helps avoid the performance problems
| of searching through directories by some kind of convention. It also
| gives you the freedom to organize your application how you want.
|
| Registering a mapping couldn't be easier. Just pass an array of class
| to path maps into the "map" function of Autoloader. Then, when you
| want to use that class, just use it. It's a piece of cake.
|
*/
Autoloader
::
map
(
array
(
//'User' => APP_PATH.'models/user.php',
//'Role' => APP_PATH.'models/role.php',
));
\ No newline at end of file
tests/laravel/application/config/application.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does nto have to be set. If it isn't we'll try our best to guess the URL
| of your application.
|
*/
'url'
=>
''
,
/*
|--------------------------------------------------------------------------
| Application Index
|--------------------------------------------------------------------------
|
| If you are including the "index.php" in your URLs, you can ignore this.
|
| However, if you are using mod_rewrite to get cleaner URLs, just set
| this option to an empty string and we'll take care of the rest.
|
*/
'index'
=>
'index.php'
,
/*
|--------------------------------------------------------------------------
| Application Key
|--------------------------------------------------------------------------
|
| This key is used by the encryption and cookie classes to generate secure
| encrypted strings and hashes. It is extremely important that this key
| remain secret and should not be shared with anyone. Make it about 32
| characters of random gibberish.
|
*/
'key'
=>
''
,
/*
|--------------------------------------------------------------------------
| Application Character Encoding
|--------------------------------------------------------------------------
|
| The default character encoding used by your application. This encoding
| will be used by the Str, Text, Form, and any other classes that need
| to know what type of encoding to use for your awesome application.
|
*/
'encoding'
=>
'UTF-8'
,
/*
|--------------------------------------------------------------------------
| Application Language
|--------------------------------------------------------------------------
|
| The default language of your application. This language will be used by
| Lang library as the default language when doing string localization.
|
*/
'language'
=>
'en'
,
/*
|--------------------------------------------------------------------------
| SSL Link Generation
|--------------------------------------------------------------------------
|
| Many sites use SSL to protect their users data. However, you may not
| always be able to use SSL on your development machine, meaning all HTTPS
| will be broken during development.
|
| For this reason, you may wish to disable the generation of HTTPS links
| throughout your application. This option does just that. All attempts to
| generate HTTPS links will generate regular HTTP links instead.
|
*/
'ssl'
=>
true
,
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| The default timezone of your application. This timezone will be used when
| Laravel needs a date, such as when writing to a log file or travelling
| to a distant star at warp speed.
|
*/
'timezone'
=>
'UTC'
,
/*
|--------------------------------------------------------------------------
| Autoloaded Bundles
|--------------------------------------------------------------------------
|
| Bundles can provide a ton of awesome drop-in functionality for your web
| application. Everything from Twitter integration to an admin backend.
|
| Here you may specify the bundles that should be automatically started
| on every request to your application.
|
*/
'bundles'
=>
array
(),
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| Here, you can specify any class aliases that you would like registered
| when Laravel loads. Aliases are lazy-loaded, so add as many as you want.
|
| Aliases make it more convenient to use namespaced classes. Instead of
| referring to the class using its full namespace, you may simply use
| the alias defined here.
|
| We have already aliased common Laravel classes to make your life easier.
|
*/
'aliases'
=>
array
(
'Auth'
=>
'Laravel\\Auth'
,
'Asset'
=>
'Laravel\\Asset'
,
'Autoloader'
=>
'Laravel\\Autoloader'
,
'Bundle'
=>
'Laravel\\Bundle'
,
'Cache'
=>
'Laravel\\Cache'
,
'Config'
=>
'Laravel\\Config'
,
'Controller'
=>
'Laravel\\Routing\\Controller'
,
'Cookie'
=>
'Laravel\\Cookie'
,
'Crypter'
=>
'Laravel\\Crypter'
,
'DB'
=>
'Laravel\\Database'
,
'Event'
=>
'Laravel\\Event'
,
'File'
=>
'Laravel\\File'
,
'Filter'
=>
'Laravel\\Routing\\Filter'
,
'Form'
=>
'Laravel\\Form'
,
'Hash'
=>
'Laravel\\Hash'
,
'HTML'
=>
'Laravel\\HTML'
,
'Input'
=>
'Laravel\\Input'
,
'IoC'
=>
'Laravel\\IoC'
,
'Lang'
=>
'Laravel\\Lang'
,
'Log'
=>
'Laravel\\Log'
,
'Memcached'
=>
'Laravel\\Memcached'
,
'Paginator'
=>
'Laravel\\Paginator'
,
'URL'
=>
'Laravel\\URL'
,
'Redirect'
=>
'Laravel\\Redirect'
,
'Redis'
=>
'Laravel\\Redis'
,
'Request'
=>
'Laravel\\Request'
,
'Response'
=>
'Laravel\\Response'
,
'Router'
=>
'Laravel\\Routing\\Router'
,
'Schema'
=>
'Laravel\\Database\\Schema'
,
'Section'
=>
'Laravel\\Section'
,
'Session'
=>
'Laravel\\Session'
,
'Str'
=>
'Laravel\\Str'
,
'Task'
=>
'Laravel\\CLI\\Tasks\\Task'
,
'URI'
=>
'Laravel\\URI'
,
'Validator'
=>
'Laravel\\Validator'
,
'View'
=>
'Laravel\\View'
,
),
);
tests/laravel/application/config/auth.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Retrieve The Current User
|--------------------------------------------------------------------------
|
| This closure is called by the Auth class' "user" method when trying to
| retrieve a user by the ID that is stored in their session. If you find
| the user, just return the user object, but make sure it has an "id"
| property. If you can't find the user, just return null.
|
| Of course, a simple and elegant authentication solution has already
| been provided for you using the query builder and hashing engine.
| We love making your life as easy as possible.
|
*/
'user'
=>
function
(
$id
)
{
if
(
filter_var
(
$id
,
FILTER_VALIDATE_INT
)
!==
false
)
{
return
DB
::
table
(
'users'
)
->
find
(
$id
);
}
},
/*
|--------------------------------------------------------------------------
| Authenticate User Credentials
|--------------------------------------------------------------------------
|
| This closure is called by the Auth::attempt() method when attempting to
| authenticate a user that is logging into your application. It's like a
| super buff bouncer to your application.
|
| If the provided credentials are correct, simply return an object that
| represents the user being authenticated. As long as it has a property
| for the "id", any object will work. If the credentials are not valid,
| you don't meed to return anything.
|
*/
'attempt'
=>
function
(
$username
,
$password
)
{
$user
=
DB
::
table
(
'users'
)
->
where_username
(
$username
)
->
first
();
if
(
!
is_null
(
$user
)
and
Hash
::
check
(
$password
,
$user
->
password
))
{
return
$user
;
}
},
/*
|--------------------------------------------------------------------------
| Logout The Current User
|--------------------------------------------------------------------------
|
| Here you may do anything that needs to be done when a user logs out of
| your application, such as call the logout method on a third-party API
| you are using for authentication or anything else you desire.
|
*/
'logout'
=>
function
(
$user
)
{}
);
\ No newline at end of file
tests/laravel/application/config/cache.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Cache Driver
|--------------------------------------------------------------------------
|
| The name of the default cache driver for your application. Caching can
| be used to increase the performance of your application by storing any
| commonly accessed data in memory, a file, or some other storage.
|
| A variety of awesome drivers are available for you to use with Laravel.
| Some, like APC, are extremely fast. However, if that isn't an option
| in your environment, try file or database caching.
|
| Drivers: 'file', 'memcached', 'apc', 'redis', 'database'.
|
*/
'driver'
=>
'file'
,
/*
|--------------------------------------------------------------------------
| Cache Key
|--------------------------------------------------------------------------
|
| This key will be prepended to item keys stored using Memcached and APC
| to prevent collisions with other applications on the server. Since the
| memory based stores could be shared by other applications, we need to
| be polite and use a prefix to uniquely identifier our items.
|
*/
'key'
=>
'laravel'
,
/*
|--------------------------------------------------------------------------
| Cache Database
|--------------------------------------------------------------------------
|
| When using the database cache driver, this database table will be used
| to store the cached item. You may also add a "connection" option to
| the array to specify which database connection should be used.
|
*/
'database'
=>
array
(
'table'
=>
'laravel_cache'
),
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| The Memcached servers used by your application. Memcached is a free and
| open source, high-performance, distributed memory caching system. It is
| generic in nature but intended for use in speeding up web applications
| by alleviating database load.
|
| For more information, check out: http://memcached.org
|
*/
'memcached'
=>
array
(
array
(
'host'
=>
'127.0.0.1'
,
'port'
=>
11211
,
'weight'
=>
100
),
),
);
\ No newline at end of file
tests/laravel/application/config/database.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Default Database Connection
|--------------------------------------------------------------------------
|
| The name of your default database connection. This connection will used
| as the default for all database operations unless a different name is
| given when performing said operation. This connection name should be
| listed in the array of connections below.
|
*/
'default'
=>
'mysql'
,
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| All of the database connections used by your application. Many of your
| applications will no doubt only use one connection; however, you have
| the freedom to specify as many connections as you can handle.
|
| All database work in Laravel is done through the PHP's PDO facilities,
| so make sure you have the PDO drivers for your particlar database of
| choice installed on your machine.
|
| Drivers: 'mysql', 'pgsql', 'sqlsrv', 'sqlite'.
|
*/
'connections'
=>
array
(
'sqlite'
=>
array
(
'driver'
=>
'sqlite'
,
'database'
=>
'application'
,
),
'mysql'
=>
array
(
'driver'
=>
'mysql'
,
'host'
=>
'localhost'
,
'database'
=>
'database'
,
'username'
=>
'root'
,
'password'
=>
'password'
,
'charset'
=>
'utf8'
,
),
'pgsql'
=>
array
(
'driver'
=>
'pgsql'
,
'host'
=>
'localhost'
,
'database'
=>
'database'
,
'username'
=>
'root'
,
'password'
=>
'password'
,
'charset'
=>
'utf8'
,
),
'sqlsrv'
=>
array
(
'driver'
=>
'sqlsrv'
,
'host'
=>
'localhost'
,
'database'
=>
'database'
,
'username'
=>
'root'
,
'password'
=>
'password'
,
),
),
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store. However, it
| provides a richer set of commands than a typical key-value store such as
| APC or memcached. All the cool kids are using it.
|
| To get the scoop on Redis, check out: http://redis.io
|
*/
'redis'
=>
array
(
'default'
=>
array
(
'host'
=>
'127.0.0.1'
,
'port'
=>
6379
),
),
);
\ No newline at end of file
tests/laravel/application/config/error.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Ignored Error Levels
|--------------------------------------------------------------------------
|
| Here you simply specify the error levels that should be ignored by the
| Laravel error handler. These levels will still be logged; however, no
| information about about them will be displayed.
|
*/
'ignore'
=>
array
(
E_NOTICE
,
E_USER_NOTICE
,
E_DEPRECATED
,
E_USER_DEPRECATED
),
/*
|--------------------------------------------------------------------------
| Error Detail
|--------------------------------------------------------------------------
|
| Detailed error messages contain information about the file in which an
| error occurs, as well as a PHP stack trace containing the call stack.
| You'll want them when you're trying to debug your application.
|
| If your application is in production, you'll want to turn off the error
| details for enhanced security and user experience since the exception
| stack trace could contain sensitive information.
|
*/
'detail'
=>
true
,
/*
|--------------------------------------------------------------------------
| Error Logging
|--------------------------------------------------------------------------
|
| When error logging is enabled, the "logger" Closure defined below will
| be called for every error in your application. You are free to log the
| errors however you want. Enjoy the flexibility.
|
*/
'log'
=>
false
,
/*
|--------------------------------------------------------------------------
| Error Logger
|--------------------------------------------------------------------------
|
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit. This function will
| be called anytime an error occurs within your application and error
| logging is enabled.
|
| You may log the error message however you like; however, a simple log
| solution has been setup for you which will log all error messages to
| text files within the application storage directory.
|
*/
'logger'
=>
function
(
$exception
)
{
Log
::
exception
(
$exception
);
},
);
\ No newline at end of file
tests/laravel/application/config/local/database.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
'default'
=>
'sqlite'
,
);
\ No newline at end of file
tests/laravel/application/config/mimes.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
'hqx'
=>
'application/mac-binhex40'
,
'cpt'
=>
'application/mac-compactpro'
,
'csv'
=>
array
(
'text/x-comma-separated-values'
,
'text/comma-separated-values'
,
'application/octet-stream'
),
'bin'
=>
'application/macbinary'
,
'dms'
=>
'application/octet-stream'
,
'lha'
=>
'application/octet-stream'
,
'lzh'
=>
'application/octet-stream'
,
'exe'
=>
array
(
'application/octet-stream'
,
'application/x-msdownload'
),
'class'
=>
'application/octet-stream'
,
'psd'
=>
'application/x-photoshop'
,
'so'
=>
'application/octet-stream'
,
'sea'
=>
'application/octet-stream'
,
'dll'
=>
'application/octet-stream'
,
'oda'
=>
'application/oda'
,
'pdf'
=>
array
(
'application/pdf'
,
'application/x-download'
),
'ai'
=>
'application/postscript'
,
'eps'
=>
'application/postscript'
,
'ps'
=>
'application/postscript'
,
'smi'
=>
'application/smil'
,
'smil'
=>
'application/smil'
,
'mif'
=>
'application/vnd.mif'
,
'xls'
=>
array
(
'application/excel'
,
'application/vnd.ms-excel'
,
'application/msexcel'
),
'ppt'
=>
array
(
'application/powerpoint'
,
'application/vnd.ms-powerpoint'
),
'wbxml'
=>
'application/wbxml'
,
'wmlc'
=>
'application/wmlc'
,
'dcr'
=>
'application/x-director'
,
'dir'
=>
'application/x-director'
,
'dxr'
=>
'application/x-director'
,
'dvi'
=>
'application/x-dvi'
,
'gtar'
=>
'application/x-gtar'
,
'gz'
=>
'application/x-gzip'
,
'php'
=>
array
(
'application/x-httpd-php'
,
'text/x-php'
),
'php4'
=>
'application/x-httpd-php'
,
'php3'
=>
'application/x-httpd-php'
,
'phtml'
=>
'application/x-httpd-php'
,
'phps'
=>
'application/x-httpd-php-source'
,
'js'
=>
'application/x-javascript'
,
'swf'
=>
'application/x-shockwave-flash'
,
'sit'
=>
'application/x-stuffit'
,
'tar'
=>
'application/x-tar'
,
'tgz'
=>
array
(
'application/x-tar'
,
'application/x-gzip-compressed'
),
'xhtml'
=>
'application/xhtml+xml'
,
'xht'
=>
'application/xhtml+xml'
,
'zip'
=>
array
(
'application/x-zip'
,
'application/zip'
,
'application/x-zip-compressed'
),
'mid'
=>
'audio/midi'
,
'midi'
=>
'audio/midi'
,
'mpga'
=>
'audio/mpeg'
,
'mp2'
=>
'audio/mpeg'
,
'mp3'
=>
array
(
'audio/mpeg'
,
'audio/mpg'
,
'audio/mpeg3'
,
'audio/mp3'
),
'aif'
=>
'audio/x-aiff'
,
'aiff'
=>
'audio/x-aiff'
,
'aifc'
=>
'audio/x-aiff'
,
'ram'
=>
'audio/x-pn-realaudio'
,
'rm'
=>
'audio/x-pn-realaudio'
,
'rpm'
=>
'audio/x-pn-realaudio-plugin'
,
'ra'
=>
'audio/x-realaudio'
,
'rv'
=>
'video/vnd.rn-realvideo'
,
'wav'
=>
'audio/x-wav'
,
'bmp'
=>
'image/bmp'
,
'gif'
=>
'image/gif'
,
'jpeg'
=>
array
(
'image/jpeg'
,
'image/pjpeg'
),
'jpg'
=>
array
(
'image/jpeg'
,
'image/pjpeg'
),
'jpe'
=>
array
(
'image/jpeg'
,
'image/pjpeg'
),
'png'
=>
'image/png'
,
'tiff'
=>
'image/tiff'
,
'tif'
=>
'image/tiff'
,
'css'
=>
'text/css'
,
'html'
=>
'text/html'
,
'htm'
=>
'text/html'
,
'shtml'
=>
'text/html'
,
'txt'
=>
'text/plain'
,
'text'
=>
'text/plain'
,
'log'
=>
array
(
'text/plain'
,
'text/x-log'
),
'rtx'
=>
'text/richtext'
,
'rtf'
=>
'text/rtf'
,
'xml'
=>
'text/xml'
,
'xsl'
=>
'text/xml'
,
'mpeg'
=>
'video/mpeg'
,
'mpg'
=>
'video/mpeg'
,
'mpe'
=>
'video/mpeg'
,
'qt'
=>
'video/quicktime'
,
'mov'
=>
'video/quicktime'
,
'avi'
=>
'video/x-msvideo'
,
'movie'
=>
'video/x-sgi-movie'
,
'doc'
=>
'application/msword'
,
'docx'
=>
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
,
'xlsx'
=>
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
'word'
=>
array
(
'application/msword'
,
'application/octet-stream'
),
'xl'
=>
'application/excel'
,
'eml'
=>
'message/rfc822'
,
'json'
=>
array
(
'application/json'
,
'text/json'
),
);
\ No newline at end of file
tests/laravel/application/config/session.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Session Driver
|--------------------------------------------------------------------------
|
| The name of the session driver used by your application. Since HTTP is
| stateless, sessions are used to simulate "state" across requests made
| by the same user of your application. In other words, it's how an
| application knows who the heck you are.
|
| Drivers: 'cookie', 'file', 'database', 'memcached', 'apc', 'redis'.
|
*/
'driver'
=>
''
,
/*
|--------------------------------------------------------------------------
| Session Database
|--------------------------------------------------------------------------
|
| The database table on which the session should be stored. It probably
| goes without saying that this option only matters if you are using
| the super slick database session driver.
|
*/
'table'
=>
'sessions'
,
/*
|--------------------------------------------------------------------------
| Session Garbage Collection Probability
|--------------------------------------------------------------------------
|
| Some session drivers require the manual clean-up of expired sessions.
| This option specifies the probability of session garbage collection
| occuring for any given request.
|
| For example, the default value states that garbage collection has a
| 2% chance of occuring for any given request to the application.
| Feel free to tune this to your application's size and speed.
|
*/
'sweepage'
=>
array
(
2
,
100
),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| The number of minutes a session can be idle before expiring.
|
*/
'lifetime'
=>
60
,
/*
|--------------------------------------------------------------------------
| Session Expiration On Close
|--------------------------------------------------------------------------
|
| Determines if the session should expire when the user's web browser closes.
|
*/
'expire_on_close'
=>
false
,
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| The name that should be given to the session cookie.
|
*/
'cookie'
=>
'laravel_session'
,
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The path for which the session cookie is available.
|
*/
'path'
=>
'/'
,
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| The domain for which the session cookie is available.
|
*/
'domain'
=>
null
,
/*
|--------------------------------------------------------------------------
| HTTPS Only Session Cookie
|--------------------------------------------------------------------------
|
| Determines if the cookie should only be sent over HTTPS.
|
*/
'secure'
=>
false
,
);
\ No newline at end of file
tests/laravel/application/config/strings.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| String Inflection
|--------------------------------------------------------------------------
|
| This array contains the singular and plural forms of words. It's used by
| the "singular" and "plural" methods on the Str class to convert a given
| word from singular to plural and vice versa.
|
| This simple array is in constrast to the complicated regular expression
| patterns used by other frameworks. We think you'll enjoy the speed and
| simplicity of this solution.
|
| When adding a word to the array, the key should be the singular form,
| while the array value should be the plural form. We've included an
| example to get you started!
|
*/
'inflection'
=>
array
(
'user'
=>
'users'
,
'person'
=>
'people'
,
'comment'
=>
'comments'
,
),
/*
|--------------------------------------------------------------------------
| ASCII Characters
|--------------------------------------------------------------------------
|
| This array contains foreign characters and their 7-bit ASCII equivalents.
| The array is used by the "ascii" method on the Str class to get strings
| ready for inclusion in a URL slug.
|
| Of course, the "ascii" method may also be used by you for whatever your
| application requires. Feel free to add any characters we missed, and be
| sure to let us know about them!
|
*/
'ascii'
=>
array
(
'/æ|ǽ/'
=>
'ae'
,
'/œ/'
=>
'oe'
,
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|А/'
=>
'A'
,
'/à|á|â|ã|ä|å|ǻ|ā|ă|ą|ǎ|ª|а/'
=>
'a'
,
'/Б/'
=>
'B'
,
'/б/'
=>
'b'
,
'/Ç|Ć|Ĉ|Ċ|Č|Ц/'
=>
'C'
,
'/ç|ć|ĉ|ċ|č|ц/'
=>
'c'
,
'/Ð|Ď|Đ|Д/'
=>
'Dj'
,
'/ð|ď|đ|д/'
=>
'dj'
,
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Е|Ё|Э/'
=>
'E'
,
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|е|ё|э/'
=>
'e'
,
'/Ф/'
=>
'F'
,
'/ƒ|ф/'
=>
'f'
,
'/Ĝ|Ğ|Ġ|Ģ|Г/'
=>
'G'
,
'/ĝ|ğ|ġ|ģ|г/'
=>
'g'
,
'/Ĥ|Ħ|Х/'
=>
'H'
,
'/ĥ|ħ|х/'
=>
'h'
,
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|И/'
=>
'I'
,
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|и/'
=>
'i'
,
'/Ĵ|Й/'
=>
'J'
,
'/ĵ|й/'
=>
'j'
,
'/Ķ|К/'
=>
'K'
,
'/ķ|к/'
=>
'k'
,
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Л/'
=>
'L'
,
'/ĺ|ļ|ľ|ŀ|ł|л/'
=>
'l'
,
'/М/'
=>
'M'
,
'/м/'
=>
'm'
,
'/Ñ|Ń|Ņ|Ň|Н/'
=>
'N'
,
'/ñ|ń|ņ|ň|ʼn|н/'
=>
'n'
,
'/Ö|Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|О/'
=>
'O'
,
'/ö|ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|о/'
=>
'o'
,
'/П/'
=>
'P'
,
'/п/'
=>
'p'
,
'/Ŕ|Ŗ|Ř|Р/'
=>
'R'
,
'/ŕ|ŗ|ř|р/'
=>
'r'
,
'/Ś|Ŝ|Ş|Š|С/'
=>
'S'
,
'/ś|ŝ|ş|š|ſ|с/'
=>
's'
,
'/Ţ|Ť|Ŧ|Т/'
=>
'T'
,
'/ţ|ť|ŧ|т/'
=>
't'
,
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|У/'
=>
'U'
,
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|у/'
=>
'u'
,
'/В/'
=>
'V'
,
'/в/'
=>
'v'
,
'/Ý|Ÿ|Ŷ|Ы/'
=>
'Y'
,
'/ý|ÿ|ŷ|ы/'
=>
'y'
,
'/Ŵ/'
=>
'W'
,
'/ŵ/'
=>
'w'
,
'/Ź|Ż|Ž|З/'
=>
'Z'
,
'/ź|ż|ž|з/'
=>
'z'
,
'/Æ|Ǽ/'
=>
'AE'
,
'/ß/'
=>
'ss'
,
'/IJ/'
=>
'IJ'
,
'/ij/'
=>
'ij'
,
'/Œ/'
=>
'OE'
,
'/Ч/'
=>
'Ch'
,
'/ч/'
=>
'ch'
,
'/Ю/'
=>
'Ju'
,
'/ю/'
=>
'ju'
,
'/Я/'
=>
'Ja'
,
'/я/'
=>
'ja'
,
'/Ш/'
=>
'Sh'
,
'/ш/'
=>
'sh'
,
'/Щ/'
=>
'Shch'
,
'/щ/'
=>
'shch'
,
'/Ж/'
=>
'Zh'
,
'/ж/'
=>
'zh'
,
),
);
\ No newline at end of file
tests/laravel/application/controllers/admin/panel.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
Admin_Panel_Controller
extends
Controller
{
}
\ No newline at end of file
tests/laravel/application/controllers/auth.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
User_Controller
extends
Controller
{
}
\ No newline at end of file
tests/laravel/application/controllers/home.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
Home_Controller
extends
Controller
{
/*
|--------------------------------------------------------------------------
| The Default Controller
|--------------------------------------------------------------------------
|
| Instead of using RESTful routes and anonymous functions, you might wish
| to use controllers to organize your application API. You'll love them.
|
| To start using this controller simply remove the default route from the
| application "routes.php" file. Laravel is smart enough to locate this
| controller and call the default method, which is "action_index".
|
| This controller responds to URIs beginning with "home", and it also
| serves as the default controller for the application, meaning it
| handles requests to the root of the application.
|
| You can respond to GET requests to "/home/profile" like so:
|
| public function action_profile()
| {
| return "This is your profile!";
| }
|
| Any extra segments are passed to the method as parameters:
|
| public function action_profile($id)
| {
| return "This is the profile for user {$id}.";
| }
|
*/
public
function
action_index
()
{
return
View
::
make
(
'home.index'
);
}
}
\ No newline at end of file
tests/laravel/application/dashboard/repository.php
deleted
100644 → 0
View file @
8325f6dc
<?php
namespace
Dashboard
;
/**
* This class is used for testing the auto-loading of classes
* that are mapped by namesapce.
*/
class
Repository
{}
\ No newline at end of file
tests/laravel/application/language/en/pagination.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the pagination links. You're free to change them to anything you want.
| If you come up with something more exciting, let us know.
|
*/
'previous'
=>
'« Previous'
,
'next'
=>
'Next »'
,
);
\ No newline at end of file
tests/laravel/application/language/en/validation.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
/*
|--------------------------------------------------------------------------
| Validation Attribute Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as "E-Mail Address" instead
| of "email". Your users will thank you.
|
| The Validator class will automatically search this array of lines it
| is attempting to replace the :attribute place-holder in messages.
| It's pretty slick. We think you'll like it.
|
*/
'attributes'
=>
array
(),
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used
| by the validator class. Some of the rules contain multiple versions,
| such as the size (max, min, between) rules. These versions are used
| for different input types such as strings and files.
|
| These language lines may be easily changed to provide custom error
| messages in your application. Error messages for custom validation
| rules may also be added to this file.
|
*/
"accepted"
=>
"The :attribute must be accepted."
,
"active_url"
=>
"The :attribute is not a valid URL."
,
"alpha"
=>
"The :attribute may only contain letters."
,
"alpha_dash"
=>
"The :attribute may only contain letters, numbers, and dashes."
,
"alpha_num"
=>
"The :attribute may only contain letters and numbers."
,
"between"
=>
array
(
"numeric"
=>
"The :attribute must be between :min - :max."
,
"file"
=>
"The :attribute must be between :min - :max kilobytes."
,
"string"
=>
"The :attribute must be between :min - :max characters."
,
),
"confirmed"
=>
"The :attribute confirmation does not match."
,
"email"
=>
"The :attribute format is invalid."
,
"image"
=>
"The :attribute must be an image."
,
"in"
=>
"The selected :attribute is invalid."
,
"integer"
=>
"The :attribute must be an integer."
,
"max"
=>
array
(
"numeric"
=>
"The :attribute must be less than :max."
,
"file"
=>
"The :attribute must be less than :max kilobytes."
,
"string"
=>
"The :attribute must be less than :max characters."
,
),
"mimes"
=>
"The :attribute must be a file of type: :values."
,
"min"
=>
array
(
"numeric"
=>
"The :attribute must be at least :min."
,
"file"
=>
"The :attribute must be at least :min kilobytes."
,
"string"
=>
"The :attribute must be at least :min characters."
,
),
"not_in"
=>
"The selected :attribute is invalid."
,
"numeric"
=>
"The :attribute must be a number."
,
"required"
=>
"The :attribute field is required."
,
"size"
=>
array
(
"numeric"
=>
"The :attribute must be :size."
,
"file"
=>
"The :attribute must be :size kilobyte."
,
"string"
=>
"The :attribute must be :size characters."
,
),
"unique"
=>
"The :attribute has already been taken."
,
"url"
=>
"The :attribute format is invalid."
,
);
\ No newline at end of file
tests/laravel/application/libraries/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/application/migrations/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/application/models/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/application/models/autoloader.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
Autoloader_HardCoded
{}
\ No newline at end of file
tests/laravel/application/models/repositories/user.php
deleted
100644 → 0
View file @
8325f6dc
<?php
namespace
Repositories
;
class
User
{}
\ No newline at end of file
tests/laravel/application/models/user.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
User
{}
\ No newline at end of file
tests/laravel/application/routes.php
deleted
100644 → 0
View file @
8325f6dc
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Simply tell Laravel the HTTP verbs and URIs it should respond to. It is a
| breeze to setup your applications using Laravel's RESTful routing, and it
| is perfectly suited for building both large applications and simple APIs.
| Enjoy the fresh air and simplicity of the framework.
|
| Let's respond to a simple GET request to http://example.com/hello:
|
| Router::register('GET /hello', function()
| {
| return 'Hello World!';
| });
|
| You can even respond to more than one URI:
|
| Router::register('GET /hello, GET /world', function()
| {
| return 'Hello World!';
| });
|
| It's easy to allow URI wildcards using (:num) or (:any):
|
| Router::register('GET /hello/(:any)', function($name)
| {
| return "Welcome, $name.";
| });
|
*/
Router
::
register
(
array
(
'GET /'
,
'GET /home'
),
function
()
{
return
View
::
make
(
'home.index'
);
});
/*
|--------------------------------------------------------------------------
| Route Filters
|--------------------------------------------------------------------------
|
| Filters provide a convenient method for attaching functionality to your
| routes. The built-in "before" and "after" filters are called before and
| after every request to your application, and you may even create other
| filters that can be attached to individual routes.
|
| Let's walk through an example...
|
| First, define a filter:
|
| Filter::register('filter', function()
| {
| return 'Filtered!';
| });
|
| Next, attach the filter to a route:
|
| Router::register('GET /', array('before' => 'filter', function()
| {
| return 'Hello World!';
| }));
|
*/
Filter
::
register
(
'before'
,
function
()
{
// Do stuff before every request to your application...
});
Filter
::
register
(
'after'
,
function
()
{
// Do stuff after every request to your application...
});
Filter
::
register
(
'csrf'
,
function
()
{
if
(
Request
::
forged
())
return
Response
::
error
(
'500'
);
});
Filter
::
register
(
'auth'
,
function
()
{
if
(
Auth
::
guest
())
return
Redirect
::
to
(
'login'
);
});
\ No newline at end of file
tests/laravel/application/tasks/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/application/views/error/404.php
deleted
100644 → 0
View file @
8325f6dc
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Error 404 - Not Found
</title>
<style>
@import
url(http://fonts.googleapis.com/css?family=Ubuntu)
;
body
{
background
:
#eee
;
color
:
#6d6d6d
;
font
:
normal
normal
normal
14px
/
1.253
Ubuntu
,
sans-serif
;
margin
:
0
0
25px
0
;
min-width
:
800px
;
padding
:
0
;
}
#main
{
background-clip
:
padding-box
;
background-color
:
#fff
;
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
box-shadow
:
0
0
10px
#cdcdcd
;
margin
:
25px
auto
0
;
padding
:
30px
;
width
:
700px
;
position
:
relative
;
}
#main
h1
{
font-family
:
'Ubuntu'
;
font-size
:
38px
;
letter-spacing
:
2px
;
margin
:
0
0
10px
0
;
padding
:
0
;
}
#main
h2
{
color
:
#999
;
font-size
:
18px
;
letter-spacing
:
3px
;
margin
:
0
0
25px
0
;
padding
:
0
0
0
0
;
}
#main
h3
{
color
:
#999
;
margin-top
:
24px
;
padding
:
0
0
0
0
;
}
#main
h3
{
font-size
:
18px
;
}
#main
p
{
line-height
:
25px
;
margin
:
10px
0
;
}
#main
pre
{
background-color
:
#333
;
border-left
:
1px
solid
#d8d8d8
;
border-top
:
1px
solid
#d8d8d8
;
border-radius
:
5px
;
color
:
#eee
;
padding
:
10px
;
}
#main
ul
{
margin
:
10px
0
;
padding
:
0
30px
;
}
#main
li
{
margin
:
5px
0
;
}
</style>
</head>
<body>
<div
id=
"main"
>
<?php
$messages
=
array
(
'We need a map.'
,
'I think we\'re lost.'
,
'We took a wrong turn.'
);
?>
<h1>
<?php
echo
$messages
[
mt_rand
(
0
,
2
)];
?>
</h1>
<h2>
Server Error: 404 (Not Found)
</h2>
<h3>
What does this mean?
</h3>
<p>
We couldn't find the page you requested on our servers. We're really sorry
about that. It's our fault, not yours. We'll work hard to get this page
back online as soon as possible.
</p>
<p>
Perhaps you would like to go to our
<?php
echo
HTML
::
link
(
'/'
,
'home page'
);
?>
?
</p>
</div>
</body>
</html>
\ No newline at end of file
tests/laravel/application/views/error/500.php
deleted
100644 → 0
View file @
8325f6dc
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Error 500 - Internal Server Error
</title>
<style>
@import
url(http://fonts.googleapis.com/css?family=Ubuntu)
;
body
{
background
:
#eee
;
color
:
#6d6d6d
;
font
:
normal
normal
normal
14px
/
1.253
Ubuntu
,
sans-serif
;
margin
:
0
0
25px
0
;
min-width
:
800px
;
padding
:
0
;
}
#main
{
background-clip
:
padding-box
;
background-color
:
#fff
;
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
box-shadow
:
0
0
10px
#cdcdcd
;
margin
:
25px
auto
0
;
padding
:
30px
;
width
:
700px
;
position
:
relative
;
}
#main
h1
{
font-family
:
'Ubuntu'
;
font-size
:
38px
;
letter-spacing
:
2px
;
margin
:
0
0
10px
0
;
padding
:
0
;
}
#main
h2
{
color
:
#999
;
font-size
:
18px
;
letter-spacing
:
3px
;
margin
:
0
0
25px
0
;
padding
:
0
0
0
0
;
}
#main
h3
{
color
:
#999
;
margin-top
:
24px
;
padding
:
0
0
0
0
;
}
#main
h3
{
font-size
:
18px
;
}
#main
p
{
line-height
:
25px
;
margin
:
10px
0
;
}
#main
pre
{
background-color
:
#333
;
border-left
:
1px
solid
#d8d8d8
;
border-top
:
1px
solid
#d8d8d8
;
border-radius
:
5px
;
color
:
#eee
;
padding
:
10px
;
}
#main
ul
{
margin
:
10px
0
;
padding
:
0
30px
;
}
#main
li
{
margin
:
5px
0
;
}
</style>
</head>
<body>
<div
id=
"main"
>
<?php
$messages
=
array
(
'Ouch.'
,
'Oh no!'
,
'Whoops!'
);
?>
<h1>
<?php
echo
$messages
[
mt_rand
(
0
,
2
)];
?>
</h1>
<h2>
Server Error: 500 (Internal Server Error)
</h2>
<h3>
What does this mean?
</h3>
<p>
Something went wrong on our servers while we were processing your request.
We're really sorry about this, and will work hard to get this resolved as
soon as possible.
</p>
<p>
Perhaps you would like to go to our
<?php
echo
HTML
::
link
(
'/'
,
'home page'
);
?>
?
</p>
</div>
</body>
</html>
\ No newline at end of file
tests/laravel/application/views/home/index.php
deleted
100644 → 0
View file @
8325f6dc
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Laravel - A Framework For Web Artisans
</title>
<style>
@import
url(http://fonts.googleapis.com/css?family=Ubuntu)
;
body
{
background
:
#eee
;
color
:
#6d6d6d
;
font
:
normal
normal
normal
14px
/
1.253
Ubuntu
,
sans-serif
;
margin
:
0
0
25px
0
;
min-width
:
800px
;
padding
:
0
;
}
#main
{
background-clip
:
padding-box
;
background-color
:
#fff
;
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
box-shadow
:
0
0
10px
#cdcdcd
;
margin
:
25px
auto
0
;
padding
:
30px
;
width
:
700px
;
position
:
relative
;
}
#main
h1
{
font-family
:
'Ubuntu'
;
font-size
:
38px
;
letter-spacing
:
2px
;
margin
:
0
0
10px
0
;
padding
:
0
;
}
#main
h2
{
color
:
#999
;
font-size
:
18px
;
letter-spacing
:
3px
;
margin
:
0
0
25px
0
;
padding
:
0
0
0
0
;
}
#main
h3
{
color
:
#999
;
margin-top
:
24px
;
padding
:
0
0
0
0
;
}
#main
h3
{
font-size
:
18px
;
}
#main
p
{
line-height
:
25px
;
margin
:
10px
0
;
}
#main
pre
{
background-color
:
#333
;
border-left
:
1px
solid
#d8d8d8
;
border-top
:
1px
solid
#d8d8d8
;
border-radius
:
5px
;
color
:
#eee
;
padding
:
10px
;
}
#main
ul
{
margin
:
10px
0
;
padding
:
0
30px
;
}
#main
li
{
margin
:
5px
0
;
}
</style>
</head>
<body>
<div
id=
"main"
>
<h1>
Welcome To Laravel
</h1>
<h2>
A Framework For Web Artisans
</h2>
<p>
You have successfully installed the Laravel framework. Laravel is a simple framework
that helps web artisans create beautiful, creative applications using elegant, expressive
syntax. You'll love using it.
</p>
<h3>
Learn the terrain.
</h3>
<p>
You've landed yourself on our default home page. The route that
is generating this page lives at:
</p>
<pre><code>
APP_PATH/routes.php
</code></pre>
<p>
And the view sitting before you can be found at:
</p>
<pre><code>
APP_PATH/views/home/index.php
</code></pre>
<h3>
Create something beautiful.
</h3>
<p>
Now that you're up and running, it's time to start creating!
Here are some links to help you get started:
</p>
<ul>
<li><a
href=
"http://laravel.com"
>
Official Website
</a></li>
<li><a
href=
"http://forums.laravel.com"
>
Laravel Forums
</a></li>
<li><a
href=
"http://github.com/laravel/laravel"
>
GitHub Repository
</a></li>
</ul>
</div>
</body>
</html>
\ No newline at end of file
tests/laravel/application/views/tests/basic.php
deleted
100644 → 0
View file @
8325f6dc
<?php
echo
$name
;
?>
is
<?php
echo
$age
;
?>
\ No newline at end of file
tests/laravel/application/views/tests/nested.php
deleted
100644 → 0
View file @
8325f6dc
Taylor
\ No newline at end of file
tests/laravel/bundles/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/bundles/bundles.php
deleted
100644 → 0
View file @
8325f6dc
<?php
/*
|--------------------------------------------------------------------------
| Bundle Configuration
|--------------------------------------------------------------------------
|
| Bundles allow you to conveniently extend and organize your application.
| Think of bundles as self-contained applications. They can have routes,
| controllers, models, views, configuration, etc. You can even create
| your own bundles to share with the Laravel community.
|
| This is a list of the bundles installed for your application and tells
| Laravel the location of the bundle's root directory, as well as the
| root URI the bundle responds to.
|
| For example, if you have an "admin" bundle located in "bundles/admin"
| that you want to handle requests with URIs that begin with "admin",
| simply add it to the array like this:
|
| 'admin' => array(
| 'location' => 'admin',
| 'handles' => 'admin',
| ),
|
| Note that the "location" is relative to the "bundles" directory.
| Now the bundle will be recognized by Laravel and will be able
| to respond to requests beginning with "admin"!
|
| Have a bundle that lives in the root of the bundle directory
| and doesn't respond to any requests? Just add the bundle
| name to the array and we'll take care of the rest.
|
*/
return
array
(
'dashboard'
=>
array
(
'location'
=>
'dashboard'
,
'handles'
=>
'dashboard'
,
),
);
\ No newline at end of file
tests/laravel/bundles/dashboard/config/meta.php
deleted
100644 → 0
View file @
8325f6dc
<?php
return
array
(
'bundle'
=>
'dashboard'
,
);
\ No newline at end of file
tests/laravel/bundles/dashboard/controllers/panel.php
deleted
100644 → 0
View file @
8325f6dc
<?php
class
Dashboard_Panel_Controller
extends
Controller
{
}
\ No newline at end of file
tests/laravel/bundles/dashboard/models/repository.php
deleted
100644 → 0
View file @
8325f6dc
<?php
namespace
Dashboard
;
/**
* This class is used for testing the auto-loading of classes
* that are mapped by namesapce.
*/
class
Repository
{}
\ No newline at end of file
tests/laravel/bundles/dashboard/routes.php
deleted
100644 → 0
View file @
8325f6dc
<?php
Router
::
register
(
'GET /dashboard'
,
function
()
{});
\ No newline at end of file
tests/laravel/storage/cache/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/storage/database/.gitignore
deleted
100644 → 0
View file @
8325f6dc
*.sqlite
\ No newline at end of file
tests/laravel/storage/logs/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/storage/sessions/.gitignore
deleted
100644 → 0
View file @
8325f6dc
tests/laravel/storage/views/.gitignore
deleted
100644 → 0
View file @
8325f6dc
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