mirror of
https://github.com/superhelio/commands.git
synced 2026-02-20 17:55:21 +00:00
CS
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Superhelio\Commands;
|
namespace Superhelio\Commands;
|
||||||
|
|
||||||
class Facade extends \Illuminate\Support\Facades\Facade
|
class Facade extends \Illuminate\Support\Facades\Facade
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Superhelio\Commands;
|
namespace Superhelio\Commands;
|
||||||
|
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
@@ -101,12 +102,12 @@ class GozerTest extends \Orchestra\Testbench\TestCase
|
|||||||
$connection = $gozer->getConnection();
|
$connection = $gozer->getConnection();
|
||||||
|
|
||||||
$tables = $gozer->getTables($connection);
|
$tables = $gozer->getTables($connection);
|
||||||
$this->assertTrue(in_array('gozerTest__users', $tables, false));
|
$this->assertTrue(\in_array('gozerTest__users', $tables, false));
|
||||||
|
|
||||||
$gozer->setDatabasePrefix('gozerTest__');
|
$gozer->setDatabasePrefix('gozerTest__');
|
||||||
$filteredTables = $gozer->getFilteredTables($tables);
|
$filteredTables = $gozer->getFilteredTables($tables);
|
||||||
$this->assertTrue(is_a($filteredTables, \Illuminate\Support\Collection::class));
|
$this->assertTrue(is_a($filteredTables, \Illuminate\Support\Collection::class));
|
||||||
$this->assertTrue(in_array('gozerTest__users', $filteredTables->toArray(), false));
|
$this->assertTrue(\in_array('gozerTest__users', $filteredTables->toArray(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_gozer_table_filtering_works()
|
public function test_gozer_table_filtering_works()
|
||||||
@@ -123,9 +124,9 @@ class GozerTest extends \Orchestra\Testbench\TestCase
|
|||||||
$filtered = $gozer->getFilteredTables($tables);
|
$filtered = $gozer->getFilteredTables($tables);
|
||||||
$array = $filtered->toArray();
|
$array = $filtered->toArray();
|
||||||
|
|
||||||
$this->assertFalse(in_array('this_should_be_filtered', $array, false));
|
$this->assertFalse(\in_array('this_should_be_filtered', $array, false));
|
||||||
$this->assertFalse(in_array('filter_me_too', $array, false));
|
$this->assertFalse(\in_array('filter_me_too', $array, false));
|
||||||
$this->assertTrue(in_array('gozerTest__users', $array, false));
|
$this->assertTrue(\in_array('gozerTest__users', $array, false));
|
||||||
$this->assertTrue(in_array('gozerTest__migrations', $array, false));
|
$this->assertTrue(\in_array('gozerTest__migrations', $array, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
|
|||||||
{
|
{
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->loadMigrationsFrom(dirname(__DIR__) . '/migrations');
|
$this->loadMigrationsFrom(\dirname(__DIR__) . '/migrations');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user