Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
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
sinan
laravel-mongodb
Commits
675bb863
Commit
675bb863
authored
Sep 21, 2013
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue #42 and tweaked tests
parent
1e533493
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
29 deletions
+45
-29
.travis.yml
.travis.yml
+2
-2
phpunit.xml
phpunit.xml
+18
-0
Builder.php
src/Jenssegers/Mongodb/Builder.php
+7
-7
CacheTest.php
tests/CacheTest.php
+1
-2
ConnectionTest.php
tests/ConnectionTest.php
+1
-3
ModelTest.php
tests/ModelTest.php
+1
-2
QueryBuilderTest.php
tests/QueryBuilderTest.php
+12
-7
QueryTest.php
tests/QueryTest.php
+1
-2
RelationsTest.php
tests/RelationsTest.php
+1
-2
SchemaTest.php
tests/SchemaTest.php
+1
-2
bootstrap.php
tests/bootstrap.php
+0
-0
No files found.
.travis.yml
View file @
675bb863
...
@@ -16,4 +16,4 @@ before_script:
...
@@ -16,4 +16,4 @@ before_script:
-
composer self-update
-
composer self-update
-
composer install --dev --no-interaction
-
composer install --dev --no-interaction
script
:
phpunit tests
script
:
phpunit
\ No newline at end of file
phpunit.xml
0 → 100644
View file @
675bb863
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals=
"false"
backupStaticAttributes=
"false"
bootstrap=
"tests/bootstrap.php"
colors=
"true"
convertErrorsToExceptions=
"true"
convertNoticesToExceptions=
"true"
convertWarningsToExceptions=
"true"
processIsolation=
"false"
stopOnFailure=
"false"
syntaxCheck=
"false"
>
<testsuites>
<testsuite
name=
"Laravel MongoDB Test Suite"
>
<directory>
tests/
</directory>
</testsuite>
</testsuites>
</phpunit>
src/Jenssegers/Mongodb/Builder.php
View file @
675bb863
...
@@ -586,7 +586,7 @@ class Builder extends \Illuminate\Database\Query\Builder {
...
@@ -586,7 +586,7 @@ class Builder extends \Illuminate\Database\Query\Builder {
}
}
}
}
// Single value
// Single value
else
else
if
(
isset
(
$where
[
'value'
]))
{
{
$where
[
'value'
]
=
$this
->
convertKey
(
$where
[
'value'
]);
$where
[
'value'
]
=
$this
->
convertKey
(
$where
[
'value'
]);
}
}
...
...
tests/CacheTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
...
...
tests/ConnectionTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
use
Jenssegers\Mongodb\Connection
;
use
Jenssegers\Mongodb\Connection
;
...
...
tests/ModelTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
class
ModelTest
extends
PHPUnit_Framework_TestCase
{
class
ModelTest
extends
PHPUnit_Framework_TestCase
{
...
...
tests/QueryBuilderTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
...
@@ -93,6 +92,12 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase {
...
@@ -93,6 +92,12 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase {
$this
->
assertEquals
(
'John Doe'
,
$user
[
'name'
]);
$this
->
assertEquals
(
'John Doe'
,
$user
[
'name'
]);
}
}
public
function
testFindNull
()
{
$user
=
DB
::
collection
(
'users'
)
->
find
(
null
);
$this
->
assertEquals
(
null
,
$user
);
}
public
function
testCount
()
public
function
testCount
()
{
{
DB
::
collection
(
'users'
)
->
insert
(
array
(
DB
::
collection
(
'users'
)
->
insert
(
array
(
...
...
tests/QueryTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
class
QueryTest
extends
PHPUnit_Framework_TestCase
{
class
QueryTest
extends
PHPUnit_Framework_TestCase
{
...
...
tests/RelationsTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
class
RelationsTest
extends
PHPUnit_Framework_TestCase
{
class
RelationsTest
extends
PHPUnit_Framework_TestCase
{
...
...
tests/SchemaTest.php
View file @
675bb863
<?php
<?php
require_once
(
'tests/app.php'
);
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Support\Facades\Schema
;
...
...
tests/
ap
p.php
→
tests/
bootstra
p.php
View file @
675bb863
File moved
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