Skip to content

Commit

Permalink
Merge pull request #333 from DirectoryTree/analysis-orokgP
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI

[ci skip] [skip ci]
  • Loading branch information
stevebauman authored Jul 25, 2021
2 parents cac9c73 + 5131dd2 commit 1f6c40b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Testing/LdapDatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function teardown()
} elseif (file_exists($dbFilePath = $connection->getDatabaseName())) {
unlink($dbFilePath);
}

unset($this->connections[$name]);
}
}
Expand Down
9 changes: 6 additions & 3 deletions tests/Feature/Emulator/EmulatedModelQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ public function test_get_only_returns_matching_object_classes()
{
TestModelStub::create(['cn' => ['John']]);

$model = new class extends Entry {
$model = new class extends Entry
{
public static $objectClasses = ['three', 'four'];
};

Expand Down Expand Up @@ -611,12 +612,14 @@ public function test_domain_scoping()
DirectoryEmulator::setup('alpha');
DirectoryEmulator::setup('bravo');

$alpha = new class extends Entry {
$alpha = new class extends Entry
{
protected $connection = 'alpha';
public static $objectClasses = ['one', 'two'];
};

$bravo = new class extends Entry {
$bravo = new class extends Entry
{
protected $connection = 'bravo';
public static $objectClasses = ['one', 'two'];
};
Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/Emulator/EmulatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace LdapRecord\Laravel\Tests\Feature;

use Illuminate\Database\Connection;
use LdapRecord\Laravel\Tests\TestCase;
use LdapRecord\Laravel\Testing\DirectoryEmulator;
use LdapRecord\Laravel\Testing\LdapDatabaseManager;
use LdapRecord\Laravel\Tests\TestCase;

class EmulatorTest extends TestCase
{
Expand All @@ -16,7 +16,7 @@ protected function getEnvironmentSetup($app)
$app['config']->set('ldap.default', 'default');
$app['config']->set('ldap.connections.default', [
'base_dn' => 'dc=local,dc=com',
'use_tls' => true
'use_tls' => true,
]);
}

Expand All @@ -29,7 +29,7 @@ public function test_sqlite_connection_is_setup()
$this->assertCount(1, $db->getConnections());

$connection = $db->getConnections()['default'];

$this->assertInstanceOf(Connection::class, $connection);
$this->assertEquals('sqlite', $connection->getConfig('driver'));
$this->assertEquals(':memory:', $connection->getDatabaseName());
Expand Down

0 comments on commit 1f6c40b

Please sign in to comment.