Commit 675bb863 authored by Jens Segers's avatar Jens Segers

Fixed issue #42 and tweaked tests

parent 1e533493
......@@ -16,4 +16,4 @@ before_script:
- composer self-update
- composer install --dev --no-interaction
script: phpunit tests
\ No newline at end of file
script: phpunit
<?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>
......@@ -586,7 +586,7 @@ class Builder extends \Illuminate\Database\Query\Builder {
}
}
// Single value
else
elseif (isset($where['value']))
{
$where['value'] = $this->convertKey($where['value']);
}
......
<?php
require_once('tests/app.php');
use Illuminate\Support\Facades\DB;
......
<?php
require_once('tests/app.php');
use Illuminate\Support\Facades\DB;
use Jenssegers\Mongodb\Connection;
......
<?php
require_once('tests/app.php');
class ModelTest extends PHPUnit_Framework_TestCase {
......
<?php
require_once('tests/app.php');
use Illuminate\Support\Facades\DB;
......@@ -93,6 +92,12 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('John Doe', $user['name']);
}
public function testFindNull()
{
$user = DB::collection('users')->find(null);
$this->assertEquals(null, $user);
}
public function testCount()
{
DB::collection('users')->insert(array(
......
<?php
require_once('tests/app.php');
class QueryTest extends PHPUnit_Framework_TestCase {
......
<?php
require_once('tests/app.php');
class RelationsTest extends PHPUnit_Framework_TestCase {
......
<?php
require_once('tests/app.php');
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment