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
ff85f8c6
Commit
ff85f8c6
authored
Oct 25, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #194, added Doctrine_Relation_ManyToMany_TestCase
Ticket: 194
parent
0835a57c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
278 additions
and
130 deletions
+278
-130
Lib.php
lib/Doctrine/Lib.php
+0
-5
Record.php
lib/Doctrine/Record.php
+3
-2
Table.php
lib/Doctrine/Table.php
+17
-21
RelationManyToManyTestCase.php
tests/RelationManyToManyTestCase.php
+194
-0
RelationTestCase.php
tests/RelationTestCase.php
+4
-48
run.php
tests/run.php
+60
-54
No files found.
lib/Doctrine/Lib.php
View file @
ff85f8c6
...
...
@@ -140,11 +140,6 @@ class Doctrine_Lib {
$r
[]
=
"<pre>"
;
$r
[]
=
"Component : "
.
$table
->
getComponentName
();
$r
[]
=
"Table : "
.
$table
->
getTableName
();
$r
[]
=
"Repository : "
.
$table
->
getRepository
()
->
count
()
.
" objects"
;
if
(
$table
->
getCache
()
instanceof
Doctrine_Cache_File
)
{
$r
[]
=
"Cache : "
.
$table
->
getCache
()
->
count
()
.
" objects"
;
$r
[]
=
"Cache hits : "
.
array_sum
(
$table
->
getCache
()
->
getStats
())
.
" hits"
;
}
$r
[]
=
"</pre>"
;
return
implode
(
"
\n
"
,
$r
)
.
"<br>"
;
}
...
...
lib/Doctrine/Record.php
View file @
ff85f8c6
...
...
@@ -496,7 +496,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
* @see Doctrine_Record::STATE_* constants
* @return integer
*/
final
public
function
getState
()
{
public
function
getState
()
{
return
$this
->
_state
;
}
/**
...
...
@@ -504,6 +504,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
* returns / assigns the state of this record
*
* @param integer|string $state if set, this method tries to set the record state to $state
* @see Doctrine_Record::STATE_* constants
*
* @throws Doctrine_Record_State_Exception if trying to set an unknown state
* @return null|integer
...
...
@@ -514,7 +515,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
}
$err
=
false
;
if
(
is_integer
(
$state
))
{
if
(
$state
>=
1
&&
$state
<=
6
)
$this
->
_state
=
$state
;
else
...
...
lib/Doctrine/Table.php
View file @
ff85f8c6
...
...
@@ -460,7 +460,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*
* @return array
*/
final
public
function
getBounds
()
{
public
function
getBounds
()
{
return
$this
->
bound
;
}
/**
...
...
@@ -469,7 +469,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param string $name
* @return array
*/
final
public
function
getBound
(
$name
)
{
public
function
getBound
(
$name
)
{
if
(
!
isset
(
$this
->
bound
[
$name
]))
throw
new
Doctrine_Table_Exception
(
'Unknown bound '
.
$name
);
...
...
@@ -481,9 +481,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param string $name
* @return array
*/
final
public
function
getBoundForName
(
$name
)
{
public
function
getBoundForName
(
$name
,
$component
)
{
foreach
(
$this
->
bound
as
$k
=>
$bound
)
{
if
(
$bound
[
3
]
==
$name
)
{
$e
=
explode
(
'.'
,
$bound
[
0
]);
if
(
$bound
[
3
]
==
$name
&&
$e
[
0
]
==
$component
)
{
return
$this
->
bound
[
$k
];
}
}
...
...
@@ -518,7 +520,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*
* @return void
*/
final
public
function
unbindAll
()
{
public
function
unbindAll
()
{
$this
->
bound
=
array
();
$this
->
relations
=
array
();
$this
->
boundAliases
=
array
();
...
...
@@ -530,7 +532,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param $name
* @return boolean
*/
final
public
function
unbind
(
$name
)
{
public
function
unbind
(
$name
)
{
if
(
!
isset
(
$this
->
bound
[
$name
]))
return
false
;
...
...
@@ -551,9 +553,9 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* @param string $field
* @return void
*/
final
public
function
bind
(
$name
,
$field
,
$type
,
$localKey
)
{
final
public
function
bind
(
$name
,
$field
,
$type
,
$localKey
)
{
if
(
isset
(
$this
->
relations
[
$name
]))
throw
new
Doctrine_Table_Exception
(
'Relation already set for '
.
$name
);
unset
(
$this
->
relations
[
$name
]
);
$e
=
explode
(
" as "
,
$name
);
$name
=
$e
[
0
];
...
...
@@ -571,21 +573,15 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
* getComponentName
* @return string the component name
*/
final
public
function
getComponentName
()
{
public
function
getComponentName
()
{
return
$this
->
options
[
'name'
];
}
/**
* @return Doctrine_Connection
*/
final
public
function
getConnection
()
{
public
function
getConnection
()
{
return
$this
->
connection
;
}
/**
* @return Doctrine_Cache
*/
final
public
function
getCache
()
{
return
$this
->
cache
;
}
/**
* hasRelatedComponent
* @return boolean
...
...
@@ -662,7 +658,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
foreach
(
array_reverse
(
$classes
)
as
$class
)
{
try
{
$bound
=
$table
->
getBoundForName
(
$class
);
$bound
=
$table
->
getBoundForName
(
$class
,
$component
);
break
;
}
catch
(
Doctrine_Table_Exception
$exc
)
{
}
...
...
@@ -670,11 +666,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
if
(
!
isset
(
$local
))
$local
=
$this
->
identifier
;
$e2
=
explode
(
"."
,
$bound
[
0
]);
$fields
=
explode
(
"-"
,
$e2
[
1
]);
$e2
=
explode
(
'.'
,
$bound
[
0
]);
$fields
=
explode
(
'-'
,
$e2
[
1
]);
if
(
$e2
[
0
]
!=
$component
)
throw
new
Doctrine_Table_Exception
(
$e2
[
0
]
.
" doesn't match "
.
$component
);
throw
new
Doctrine_Table_Exception
(
$e2
[
0
]
.
' doesn\'t match '
.
$component
);
$associationTable
=
$this
->
connection
->
getTable
(
$e2
[
0
]);
...
...
@@ -973,7 +969,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
final
public
function
enumValue
(
$field
,
$index
)
{
if
(
$index
instanceof
Doctrine_Null
)
return
$index
;
return
isset
(
$this
->
options
[
'enumMap'
][
$field
][
$index
])
?
$this
->
options
[
'enumMap'
][
$field
][
$index
]
:
$index
;
}
/**
...
...
tests/RelationManyToManyTestCase.php
0 → 100644
View file @
ff85f8c6
<?php
class
M2MTest
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
200
);
$this
->
hasColumn
(
'child_id'
,
'integer'
);
}
public
function
setUp
()
{
$this
->
ownsMany
(
'OwnsOneToManyWithAlias as AliasO2M'
,
'AliasO2M.component_id'
);
$this
->
hasMany
(
'RTC1 as RTC1'
,
'JC1.c1_id'
);
$this
->
hasMany
(
'RTC2 as RTC2'
,
'JC1.c1_id'
);
$this
->
hasMany
(
'RTC3 as RTC3'
,
'JC2.c1_id'
);
$this
->
hasMany
(
'RTC3 as RTC4'
,
'JC1.c1_id'
);
}
}
class
JC1
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'c1_id'
,
'integer'
);
$this
->
hasColumn
(
'c2_id'
,
'integer'
);
}
}
class
JC2
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'c1_id'
,
'integer'
);
$this
->
hasColumn
(
'c2_id'
,
'integer'
);
}
}
class
RTC1
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
200
);
}
public
function
setUp
()
{
$this
->
hasMany
(
'M2MTest as RTC1'
,
'JC1.c2_id'
);
}
}
class
RTC2
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
200
);
}
public
function
setUp
()
{
$this
->
hasMany
(
'M2MTest as RTC2'
,
'JC1.c2_id'
);
}
}
class
RTC3
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
200
);
}
public
function
setUp
()
{
$this
->
hasMany
(
'M2MTest as RTC3'
,
'JC2.c2_id'
);
$this
->
hasMany
(
'M2MTest as RTC4'
,
'JC1.c2_id'
);
}
}
class
Doctrine_Relation_ManyToMany_TestCase
extends
Doctrine_UnitTestCase
{
public
function
prepareData
()
{
}
public
function
prepareTables
()
{
parent
::
prepareTables
();
}
public
function
testManyToManyHasRelationWithAliases4
()
{
$component
=
new
M2MTest
();
try
{
$rel
=
$component
->
getTable
()
->
getRelation
(
'RTC4'
);
$this
->
pass
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_Association
);
$this
->
assertTrue
(
$component
->
RTC4
instanceof
Doctrine_Collection
);
}
public
function
testManyToManyHasRelationWithAliases3
()
{
$component
=
new
M2MTest
();
try
{
$rel
=
$component
->
getTable
()
->
getRelation
(
'RTC3'
);
$this
->
pass
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_Association
);
$this
->
assertTrue
(
$component
->
RTC3
instanceof
Doctrine_Collection
);
}
public
function
testManyToManyHasRelationWithAliases
()
{
$component
=
new
M2MTest
();
$component
->
AliasO2M
;
try
{
$rel
=
$component
->
getTable
()
->
getRelation
(
'RTC1'
);
$this
->
pass
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_Association
);
$this
->
assertTrue
(
$component
->
RTC1
instanceof
Doctrine_Collection
);
}
public
function
testManyToManyHasRelationWithAliases2
()
{
$component
=
new
M2MTest
();
try
{
$rel
=
$component
->
getTable
()
->
getRelation
(
'RTC2'
);
$this
->
pass
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_Association
);
$this
->
assertTrue
(
$component
->
RTC1
instanceof
Doctrine_Collection
);
}
public
function
testManyToManyRelationSaving
()
{
$component
=
new
M2MTest
();
$component
->
RTC1
[
0
]
->
name
=
'1'
;
$component
->
RTC1
[
1
]
->
name
=
'2'
;
$component
->
name
=
'2'
;
$count
=
$this
->
dbh
->
count
();
$component
->
save
();
$this
->
assertEqual
(
$this
->
dbh
->
count
(),
(
$count
+
5
));
$this
->
assertEqual
(
$component
->
RTC1
->
count
(),
2
);
$component
=
$component
->
getTable
()
->
find
(
$component
->
id
);
$this
->
assertEqual
(
$component
->
RTC1
->
count
(),
2
);
// check that it doesn't matter saving the other M2M components as well
$component
->
RTC2
[
0
]
->
name
=
'1'
;
$component
->
RTC2
[
1
]
->
name
=
'2'
;
$count
=
$this
->
dbh
->
count
();
$component
->
save
();
$this
->
assertEqual
(
$this
->
dbh
->
count
(),
(
$count
+
4
));
$this
->
assertEqual
(
$component
->
RTC2
->
count
(),
2
);
$component
=
$component
->
getTable
()
->
find
(
$component
->
id
);
$this
->
assertEqual
(
$component
->
RTC2
->
count
(),
2
);
}
public
function
testManyToManyRelationSaving2
()
{
$component
=
new
M2MTest
();
$component
->
RTC2
[
0
]
->
name
=
'1'
;
$component
->
RTC2
[
1
]
->
name
=
'2'
;
$component
->
name
=
'2'
;
$count
=
$this
->
dbh
->
count
();
$component
->
save
();
$this
->
assertEqual
(
$this
->
dbh
->
count
(),
(
$count
+
5
));
$this
->
assertEqual
(
$component
->
RTC2
->
count
(),
2
);
$component
=
$component
->
getTable
()
->
find
(
$component
->
id
);
$this
->
assertEqual
(
$component
->
RTC2
->
count
(),
2
);
// check that it doesn't matter saving the other M2M components as well
$component
->
RTC1
[
0
]
->
name
=
'1'
;
$component
->
RTC1
[
1
]
->
name
=
'2'
;
$count
=
$this
->
dbh
->
count
();
$component
->
save
();
$this
->
assertEqual
(
$this
->
dbh
->
count
(),
(
$count
+
4
));
$this
->
assertEqual
(
$component
->
RTC1
->
count
(),
2
);
$component
=
$component
->
getTable
()
->
find
(
$component
->
id
);
$this
->
assertEqual
(
$component
->
RTC1
->
count
(),
2
);
}
}
?>
tests/RelationTestCase.php
View file @
ff85f8c6
...
...
@@ -7,8 +7,6 @@ class RelationTest extends Doctrine_Record {
}
public
function
setUp
()
{
$this
->
ownsMany
(
'OwnsOneToManyWithAlias as AliasO2M'
,
'AliasO2M.component_id'
);
$this
->
hasMany
(
'M2M as AliasM2M'
,
'JoinTable.c1_id'
);
// $this->hasMany('M2M as AliasM2M2', 'JoinTable.c1_id');
}
}
class
RelationTestChild
extends
RelationTest
{
...
...
@@ -25,12 +23,7 @@ class HasOneToOne extends Doctrine_Record {
class
HasOneToOneWithAlias
extends
Doctrine_Record
{
}
class
JoinTable
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'c1_id'
,
'integer'
);
$this
->
hasColumn
(
'c2_id'
,
'integer'
);
}
}
class
HasManyWithAlias
extends
Doctrine_Record
{
}
...
...
@@ -42,21 +35,14 @@ class OwnsOneToManyWithAlias extends Doctrine_Record {
}
}
class
M2M
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
200
);
}
public
function
setUp
()
{
$this
->
hasMany
(
'RelationTest as AliasM2M'
,
'JoinTable.c2_id'
);
}
}
class
Doctrine_Relation_TestCase
extends
Doctrine_UnitTestCase
{
public
function
prepareData
()
{
}
public
function
prepareTables
()
{
$this
->
tables
=
array
(
'M2M'
,
'RelationTest'
,
'JoinTable'
);
parent
::
prepareTables
();
}
public
function
testOneToManyTreeRelationWithConcreteInheritance
()
{
$component
=
new
RelationTestChild
();
...
...
@@ -98,36 +84,6 @@ class Doctrine_Relation_TestCase extends Doctrine_UnitTestCase {
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_ForeignKey
);
}
public
function
testManyToManyHasRelationWithAliases
()
{
$component
=
new
RelationTest
();
try
{
$rel
=
$component
->
getTable
()
->
getRelation
(
'AliasM2M'
);
$this
->
pass
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertTrue
(
$rel
instanceof
Doctrine_Relation_Association
);
$this
->
assertTrue
(
$component
->
AliasM2M
instanceof
Doctrine_Collection
);
$component
->
AliasM2M
[
0
]
->
name
=
'1'
;
$component
->
AliasM2M
[
1
]
->
name
=
'2'
;
$component
->
name
=
'2'
;
$count
=
$this
->
dbh
->
count
();
$component
->
save
();
$this
->
assertEqual
(
$this
->
dbh
->
count
(),
(
$count
+
5
));
$this
->
assertEqual
(
$component
->
AliasM2M
->
count
(),
2
);
$component
=
$component
->
getTable
()
->
find
(
$component
->
id
);
$this
->
assertEqual
(
$component
->
AliasM2M
->
count
(),
2
);
}
public
function
testManyToManyRelation
()
{
$this
->
manager
->
setAttribute
(
Doctrine
::
ATTR_CREATE_TABLES
,
false
);
...
...
tests/run.php
View file @
ff85f8c6
...
...
@@ -2,64 +2,70 @@
ob_start
();
require_once
(
"ConfigurableTestCase.php"
);
require_once
(
"ManagerTestCase.php"
);
require_once
(
"ConnectionTestCase.php"
);
require_once
(
"ConnectionTransactionTestCase.php"
);
require_once
(
"TableTestCase.php"
);
require_once
(
"EventListenerTestCase.php"
);
require_once
(
"BatchIteratorTestCase.php"
);
require_once
(
"CacheFileTestCase.php"
);
require_once
(
"RecordTestCase.php"
);
require_once
(
"RecordStateTestCase.php"
);
require_once
(
"RecordFilterTestCase.php"
);
require_once
(
"AccessTestCase.php"
);
require_once
(
"ValidatorTestCase.php"
);
require_once
(
"CollectionTestCase.php"
);
require_once
(
"PessimisticLockingTestCase.php"
);
require_once
(
"EventListenerChainTestCase.php"
);
require_once
(
"CacheSqliteTestCase.php"
);
require_once
(
"CollectionOffsetTestCase.php"
);
require_once
(
"CacheQuerySqliteTestCase.php"
);
require_once
(
"ViewTestCase.php"
);
require_once
(
"RawSqlTestCase.php"
);
require_once
(
"CustomPrimaryKeyTestCase.php"
);
require_once
(
"FilterTestCase.php"
);
require_once
(
"QueryTestCase.php"
);
require_once
(
"QueryLimitTestCase.php"
);
require_once
(
"QueryMultiJoinTestCase.php"
);
require_once
(
"QueryReferenceModelTestCase.php"
);
require_once
(
"QueryWhereTestCase.php"
);
require_once
(
"QueryFromTestCase.php"
);
require_once
(
"QueryConditionTestCase.php"
);
require_once
(
"QueryComponentAliasTestCase.php"
);
require_once
(
"QuerySubqueryTestCase.php"
);
require_once
(
"QuerySelectTestCase.php"
);
require_once
(
"QueryDeleteTestCase.php"
);
require_once
(
"QueryUpdateTestCase.php"
);
require_once
(
"DBTestCase.php"
);
require_once
(
"SchemaTestCase.php"
);
require_once
(
"ImportTestCase.php"
);
require_once
(
"BooleanTestCase.php"
);
require_once
(
"EnumTestCase.php"
);
require_once
(
"RelationAccessTestCase.php"
);
require_once
(
"RelationTestCase.php"
);
require_once
(
"DataDictSqliteTestCase.php"
);
require_once
(
"CustomResultSetOrderTestCase.php"
);
require_once
(
'ConfigurableTestCase.php'
);
require_once
(
'ManagerTestCase.php'
);
require_once
(
'ConnectionTestCase.php'
);
require_once
(
'ConnectionTransactionTestCase.php'
);
require_once
(
'TableTestCase.php'
);
require_once
(
'EventListenerTestCase.php'
);
require_once
(
'BatchIteratorTestCase.php'
);
require_once
(
'CacheFileTestCase.php'
);
require_once
(
'RecordTestCase.php'
);
require_once
(
'RecordStateTestCase.php'
);
require_once
(
'RecordFilterTestCase.php'
);
require_once
(
'AccessTestCase.php'
);
require_once
(
'ValidatorTestCase.php'
);
require_once
(
'CollectionTestCase.php'
);
require_once
(
'PessimisticLockingTestCase.php'
);
require_once
(
'EventListenerChainTestCase.php'
);
require_once
(
'CacheSqliteTestCase.php'
);
require_once
(
'CollectionOffsetTestCase.php'
);
require_once
(
'CacheQuerySqliteTestCase.php'
);
require_once
(
'ViewTestCase.php'
);
require_once
(
'RawSqlTestCase.php'
);
require_once
(
'CustomPrimaryKeyTestCase.php'
);
require_once
(
'FilterTestCase.php'
);
require_once
(
'QueryTestCase.php'
);
require_once
(
'QueryLimitTestCase.php'
);
require_once
(
'QueryMultiJoinTestCase.php'
);
require_once
(
'QueryReferenceModelTestCase.php'
);
require_once
(
'QueryWhereTestCase.php'
);
require_once
(
'QueryFromTestCase.php'
);
require_once
(
'QueryConditionTestCase.php'
);
require_once
(
'QueryComponentAliasTestCase.php'
);
require_once
(
'QuerySubqueryTestCase.php'
);
require_once
(
'QuerySelectTestCase.php'
);
require_once
(
'QueryDeleteTestCase.php'
);
require_once
(
'QueryUpdateTestCase.php'
);
require_once
(
'RelationAccessTestCase.php'
);
require_once
(
'RelationTestCase.php'
);
require_once
(
'RelationManyToManyTestCase.php'
);
require_once
(
'DBTestCase.php'
);
require_once
(
'SchemaTestCase.php'
);
require_once
(
'ImportTestCase.php'
);
require_once
(
'BooleanTestCase.php'
);
require_once
(
'EnumTestCase.php'
);
require_once
(
'DataDictSqliteTestCase.php'
);
require_once
(
'CustomResultSetOrderTestCase.php'
);
error_reporting
(
E_ALL
);
print
"<pre>"
;
print
'<pre>'
;
$test
=
new
GroupTest
(
"Doctrine Framework Unit Tests"
);
$test
=
new
GroupTest
(
'Doctrine Framework Unit Tests'
);
$test
->
addTestCase
(
new
Doctrine_Relation_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Relation_ManyToMany_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Record_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Record_State_TestCase
());
...
...
@@ -174,9 +180,9 @@ if (TextReporter::inCli()) {
}
else
{
if
(
isset
(
$_POST
))
{
$dsn
=
isset
(
$_POST
[
'dsn'
])
?
$_POST
[
'dsn'
]
:
null
;
$username
=
isset
(
$_POST
[
'username'
])
?
$_POST
[
'username'
]
:
null
;
$password
=
isset
(
$_POST
[
'password'
])
?
$_POST
[
'password'
]
:
null
;
$dsn
=
isset
(
$_POST
[
"dsn"
])
?
$_POST
[
"dsn"
]
:
null
;
$username
=
isset
(
$_POST
[
"username"
])
?
$_POST
[
"username"
]
:
null
;
$password
=
isset
(
$_POST
[
"password"
])
?
$_POST
[
"password"
]
:
null
;
}
$test
->
run
(
new
MyReporter
());
$output
=
ob_get_clean
();
...
...
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