Skip to content

Commit

Permalink
Merge pull request #13 from ppshobi/improvements-to-the-test-suites
Browse files Browse the repository at this point in the history
Improvements to the test suites
  • Loading branch information
curquiza committed Apr 20, 2020
2 parents 95b30aa + ce736c9 commit 0321162
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 26 deletions.
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"MeiliSearch\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"tests/utils.php"
]
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"friendsofphp/php-cs-fixer": "^2.16"
Expand Down
14 changes: 14 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false"
cacheResult="false"
colors="true">
<testsuites>
<testsuite name="Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 0 additions & 2 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
use MeiliSearch\Index;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class ClientTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/DocumentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
use MeiliSearch\Exceptions\HTTPRequestException;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class DocumentsTest extends TestCase
{
private static $index;
Expand Down
2 changes: 0 additions & 2 deletions tests/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
use MeiliSearch\Exceptions\TimeOutException;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class IndexTest extends TestCase
{
private static $index1;
Expand Down
2 changes: 0 additions & 2 deletions tests/KeysAndPermissionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
use MeiliSearch\Exceptions\HTTPRequestException;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class KeysAndPermissionsTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
use MeiliSearch\Exceptions\HTTPRequestException;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class SearchTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/AcceptNewFieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class AcceptNewFieldsTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/DistinctAttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class DistinctAttributeTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/RankingRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class RankingRulesTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/SearchableAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class SearchableAttributesTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/SettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class SettingsTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/StopWordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class StopWordsTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/Settings/SynonymsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use MeiliSearch\Client;
use PHPUnit\Framework\TestCase;

require_once dirname(dirname(__FILE__)).'/utils.php';

class SynonymsTest extends TestCase
{
private static $client;
Expand Down
2 changes: 0 additions & 2 deletions tests/UpdatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
use MeiliSearch\Exceptions\HTTPRequestException;
use PHPUnit\Framework\TestCase;

require_once 'utils.php';

class UpdatesTest extends TestCase
{
private static $index;
Expand Down

0 comments on commit 0321162

Please sign in to comment.