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
0087f3fe
Commit
0087f3fe
authored
Dec 20, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #382 from flip111/patch-4
Update TestInit.php for new autoloading stuff
parents
6cd3df41
330d31cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
TestInit.php
tests/Doctrine/Tests/TestInit.php
+12
-4
No files found.
tests/Doctrine/Tests/TestInit.php
View file @
0087f3fe
...
...
@@ -6,8 +6,16 @@ namespace Doctrine\Tests;
error_reporting
(
E_ALL
|
E_STRICT
);
require_once
__DIR__
.
'/../../../vendor/autoload.php'
;
$classLoader
=
new
\Doctrine\Common\ClassLoader
(
'Doctrine\Tests'
,
__DIR__
.
'/../../'
);
$classLoader
->
register
();
if
(
file_exists
(
__DIR__
.
'/../../../vendor/autoload.php'
))
{
// dependencies were installed via composer - this is the main project
$classLoader
=
require
__DIR__
.
'/../../../vendor/autoload.php'
;
}
elseif
(
file_exists
(
__DIR__
.
'/../../../../../autoload.php'
))
{
// installed as a dependency in `vendor`
$classLoader
=
require
__DIR__
.
'/../../../../../autoload.php'
;
}
else
{
throw
new
\Exception
(
'Can\'t find autoload.php. Did you install dependencies via composer?'
);
}
/* @var $classLoader \Composer\Autoload\ClassLoader */
$classLoader
->
add
(
'Doctrine\\Tests\\'
,
__DIR__
.
'/../../'
);
unset
(
$classLoader
);
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