mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
ALPHA 3.0.5a
This commit is contained in:
45
.env.testing
Normal file
45
.env.testing
Normal file
@@ -0,0 +1,45 @@
|
||||
APP_NAME=C-CMS
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc=
|
||||
APP_DEBUG=true
|
||||
APP_URL=https://dev.c-cms.cf/
|
||||
|
||||
SQN_NUMBER=000
|
||||
SQN_FULLNAME="TESTING SQUADRON"
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=ddb_dev
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=nHpz39lp
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=mailgun
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
NEXMO_KEY=f52074e0
|
||||
NEXMO_SECRET=lXK9GasDUdotWqL3
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
@@ -208,7 +208,7 @@ class User extends Authenticatable
|
||||
|
||||
$filtered_schedule = collect();
|
||||
|
||||
foreach (\App\Schedule::all() as $day) {
|
||||
foreach ($schedules as $day) {
|
||||
if ($day->date >= date('Y-m-d')) {
|
||||
$filtered_schedule->push($day);
|
||||
}
|
||||
|
||||
61
tests/Feature/AdminTest.php
Normal file
61
tests/Feature/AdminTest.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class AdminTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUrl()
|
||||
{
|
||||
$appURL = "dev.c-cms.cf";
|
||||
|
||||
$urls = [
|
||||
'admin',
|
||||
'admin/calendar',
|
||||
'admin/message',
|
||||
'admin/message/add',
|
||||
'admin/inventory',
|
||||
'admin/item/add',
|
||||
'admin/inventory/booking',
|
||||
'admin/stats/log',
|
||||
'admin/user/add',
|
||||
'admin/user',
|
||||
'admin/config',
|
||||
'admin/update'
|
||||
];
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 404){
|
||||
echo $appURL . $url . ' (FAILED) return a 404.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 500){
|
||||
echo $appURL . $url . ' (FAILED) return a 500.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
54
tests/Feature/ECCTest.php
Normal file
54
tests/Feature/ECCTest.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ECCTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUrl()
|
||||
{
|
||||
$appURL = "dev.c-cms.cf";
|
||||
|
||||
$urls = [
|
||||
'ecc',
|
||||
'ecc/calendar',
|
||||
'ecc/messages',
|
||||
'ecc/guide',
|
||||
'ecc/update'
|
||||
];
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 404){
|
||||
echo $appURL . $url . ' (FAILED) return a 404.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 500){
|
||||
echo $appURL . $url . ' (FAILED) return a 500.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicTest()
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
}
|
||||
52
tests/Feature/PublicTest.php
Normal file
52
tests/Feature/PublicTest.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class PublicTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testUrl()
|
||||
{
|
||||
$appURL = "dev.c-cms.cf";
|
||||
|
||||
$urls = [
|
||||
'',
|
||||
'login',
|
||||
'logout'
|
||||
];
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 404){
|
||||
echo $appURL . $url . ' (FAILED) return a 404.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$response = $this->get($url);
|
||||
if((int)$response->status() === 500){
|
||||
echo $appURL . $url . ' (FAILED) return a 500.';
|
||||
$this->assertTrue(false);
|
||||
} else {
|
||||
echo $appURL . $url . ' (SUCCESS)';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicTest()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user