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
a38a1f51
Commit
a38a1f51
authored
Feb 18, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified first platform test. Further platform tests should follow the same scheme.
parent
68147808
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
AllTests.php
tests/Doctrine/Tests/DBAL/AllTests.php
+3
-3
SqlitePlatformTest.php
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php
+5
-11
No files found.
tests/Doctrine/Tests/DBAL/AllTests.php
View file @
a38a1f51
...
...
@@ -6,7 +6,7 @@ use Doctrine\Tests\DBAL\Component;
use
Doctrine\Tests\DBAL\Ticker
;
if
(
!
defined
(
'PHPUnit_MAIN_METHOD'
))
{
define
(
'PHPUnit_MAIN_METHOD'
,
'Dbal_AllTests::main'
);
define
(
'PHPUnit_MAIN_METHOD'
,
'Dbal_
Platforms_
AllTests::main'
);
}
require_once
__DIR__
.
'/../TestInit.php'
;
...
...
@@ -22,12 +22,12 @@ class AllTests
{
$suite
=
new
\Doctrine\Tests\DbalTestSuite
(
'Doctrine DBAL'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\DBAL\Platforms\
Abstract
PlatformTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\DBAL\Platforms\
Sqlite
PlatformTest'
);
return
$suite
;
}
}
if
(
PHPUnit_MAIN_METHOD
==
'Dbal_AllTests::main'
)
{
if
(
PHPUnit_MAIN_METHOD
==
'Dbal_
Platforms_
AllTests::main'
)
{
AllTests
::
main
();
}
\ No newline at end of file
tests/Doctrine/Tests/DBAL/Platforms/
Abstract
PlatformTest.php
→
tests/Doctrine/Tests/DBAL/Platforms/
Sqlite
PlatformTest.php
View file @
a38a1f51
...
...
@@ -2,23 +2,17 @@
namespace
Doctrine\Tests\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
require_once
__DIR__
.
'/../../TestInit.php'
;
class
Abstract
PlatformTest
extends
\Doctrine\Tests\DbalTestCase
class
Sqlite
PlatformTest
extends
\Doctrine\Tests\DbalTestCase
{
private
$_
conn
;
private
$_
platform
;
public
function
setUp
()
{
$this
->
_config
=
new
\Doctrine\DBAL\Configuration
;
$this
->
_eventManager
=
new
\Doctrine\Common\EventManager
;
$options
=
array
(
'driver'
=>
'pdo_sqlite'
,
'memory'
=>
true
);
$this
->
_conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$options
,
$this
->
_config
,
$this
->
_eventManager
);
$this
->
_platform
=
$this
->
_conn
->
getDatabasePlatform
();
$this
->
_sm
=
$this
->
_conn
->
getSchemaManager
();
$this
->
_platform
=
new
SqlitePlatform
;
}
public
function
testGetCreateTableSql
()
...
...
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