This commit is contained in:
KNaveenraj-ladybird
2023-09-12 18:19:44 +05:30
committed by RafficMohammed
parent 6cebe281e9
commit 06fd163c60
5 changed files with 104 additions and 35 deletions

View File

@@ -63,7 +63,7 @@ Route::prefix('api/v1')->group(function () {
/* /*
* FCM token response * FCM token response
*/ */
Route::post('fcmtoken', [Common\PushNotificationController::class, 'fcmToken'])->name('fcmtoken'); //Route::post('fcmtoken', [Common\PushNotificationController::class, 'fcmToken'])->name('fcmtoken');
}); });
/* /*
* ================================================================================================ * ================================================================================================

59
phpunit.xml Normal file → Executable file
View File

@@ -1,36 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="bootstrap/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
backupStaticAttributes="false" <coverage includeUncoveredFiles="true">
bootstrap="bootstrap/autoload.php" <include>
colors="true" <directory suffix=".php">app/</directory>
convertErrorsToExceptions="true" </include>
convertNoticesToExceptions="true" </coverage>
convertWarningsToExceptions="true" <testsuites>
processIsolation="false" <testsuite name="feature">
stopOnFailure="false"> <directory>tests/Feature</directory>
<testsuites> </testsuite>
<testsuite name="all"> <testsuite name="unit">
<directory>./tests/</directory> <directory>tests/Unit</directory>
</testsuite> </testsuite>
<testsuite name="unit"> </testsuites>
<directory>./tests/unit</directory> <php>
</testsuite> <env name="APP_ENV" value="testing"/>
</testsuites> <!-- <env name="DB_CONNECTION" value="testing"/>
<filter> <env name="DB_DATABASE" value="testing_db"/> -->
<whitelist addUncoveredFilesFromWhitelist="true"> <env name="CACHE_DRIVER" value="array"/>
<directory suffix=".php">app/</directory> <env name="SESSION_DRIVER" value="array"/>
</whitelist> <env name="QUEUE_CONNECTION" value="sync"/>
</filter> <env name="MAIL_MAILER" value="mail"/>
<php> <env name="APP_URL" value="http://localhost:8000"/>
<env name="APP_ENV" value="testing"/> <env name="DB_INSTALL" value="1"/>
<env name="DB_CONNECTION" value="testing"/> </php>
<env name="DB_DATABASE" value="testing_db"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="MAIL_MAILER" value="mail"/>
<env name="APP_URL" value="http://localhost:8000"/>
<env name="DB_DATABASE" value="testing_db"/>
<env name="DB_INSTALL" value="1"/>
</php>
</phpunit> </phpunit>

36
phpunit.xml.bak Executable file
View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="all">
<directory>./tests/</directory>
</testsuite>
<testsuite name="unit">
<directory>./tests/unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">app/</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="testing"/>
<env name="DB_DATABASE" value="testing_db"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="MAIL_MAILER" value="mail"/>
<env name="APP_URL" value="http://localhost:8000"/>
<env name="DB_DATABASE" value="testing_db"/>
<env name="DB_INSTALL" value="1"/>
</php>
</phpunit>

23
tests/Feature/RouteTest.php Executable file
View File

@@ -0,0 +1,23 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class RouteTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function test_example()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace Tests\Unit;
use Tests\TestCase;
class ArtisanCommandTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testRouteListCommand()
{
$this->artisan('route:list')
->assertExitCode(0);
}
}