FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
data-mapper/tests/integration/MySQL/InsertTest.php at master · g4code/data-mapper · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
g4code
/
data-mapper
Public
Notifications
You must be signed in to change notification settings
Fork
10
Star
2
Code
Issues
0
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
data-mapper
/
tests
/
integration
/
MySQL
/
InsertTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (26 loc) · 860 Bytes
Breadcrumbs
data-mapper
/
tests
/
integration
/
MySQL
/
InsertTest.php
Copy path
File metadata and controls
35 lines (26 loc) · 860 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace
G4
\
DataMapper
\
Test
\
Integration
\
MySQL
;
use
G4
\
DataMapper
\
Engine
\
MySQL
\
MySQLTableName
;
use
G4
\
DataMapper
\
Exception
\
MySQLMapperException
;
class
InsertTest
extends
TestCase
{
public
function
testInsert
()
{
$
this
->
makeMapper
()->
insert
(
$
this
->
makeMapping
());
$
rawData
=
$
this
->
makeMapper
()->
find
(
$
this
->
makeIdentityById
());
$
this
->
assertEquals
(
1
,
$
rawData
->
count
());
$
this
->
assertEquals
(
$
this
->
getData
(),
$
rawData
->
getOne
());
}
public
function
testException
()
{
$
this
->
expectException
(MySQLMapperException::class);
$
this
->
getBuilder
()
->
collectionName
(
new
MySQLTableName
(
$
this
->
getTableName
() .
'
_fail
'
))
->
buildMapper
()
->
insert
(
$
this
->
makeMapping
());
}
public
function
getTableName
()
{
return
'
test_insert
'
;
}
}
Back
|
FazBrowse Home
|
New Git URL