Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nticaric committed Aug 16, 2016
1 parent 6ec6215 commit 6216676
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/vendor
/.env
composer.phar
composer.lock
.DS_Store
Thumbs.db
/phpunit.xml
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: php

php:
- 5.6
- 7.0
- 7.1

sudo: false

install: travis_retry composer install --no-interaction --prefer-source

script: vendor/bin/phpunit --verbose
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) <Taylor Otwell>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
30 changes: 30 additions & 0 deletions tests/TNTSearchEngineTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

use TeamTNT\Scout\Engines\TNTSearchEngine;
use Illuminate\Database\Eloquent\Collection;

class AlgoliaEngineTest extends PHPUnit_Framework_TestCase
{
public function tearDown()
{
Mockery::close();
}
}

class TNTSearchEngineTestModel
{
public function searchableAs()
{
return 'table';
}

public function getKey()
{
return 1;
}

public function toSearchableArray()
{
return ['id' => 1];
}
}

0 comments on commit 6216676

Please sign in to comment.